Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML Parser

 
Rahul Nair
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

Just for Curiosity, Which XML Parser struts1 and 2 internally using for parsing the Struts configuration file.
Also, Which one is efficient SAX or DOM ? What is the difference between them ?

Thanks,

Rahul
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 197
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Question !

Go through the links below.

Struts xml parser

and the second question SAX or DOM which is best?

SAX vs DOM
 
mahammad gouse
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
in struts it both uses the SAX and DOM parsers.
the diff. is SAX is an Event based parser and DOM is tree based parser.
DOM consumes more memory than SAX.
so if you want to read the XML doc. then go for SAX.
if you are doing update delete insert operations on XML then go for DOM.


bye
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic