what is the difference between SAX Parser and DOM Parser??

Answer Posted / raju

SAX
• Parses node by node
• Doesn’t store the XML in memory
• We cant insert or delete a node
• SAX is an event based parser
• SAX is a Simple API for XML
• doesn’t preserve comments
• SAX generally runs a little faster than DOM

DOM
• Stores the entire XML document into memory before processing
• Occupies more memory
• We can insert or delete nodes
• Traverse in any direction.
• DOM is a tree model parser
• Document Object Model (DOM) API
• Preserves comments
• SAX generally runs a little faster than DOM

-raju

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can link tag’s action attribute be used?

524


How to handle exceptions in structs?

576


Explain the life cycle of a request in struct2 application?

494


while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert

2056


What is the difference between validation.xml and validator-rules.xml files in struts?

513






What are construction struts?

513


What is struts framework?

553


What is role of action class?

563


How to upload struts file?

606


What is the role of action class in struts?

561


Which file is used by controller to get mapping information for request routing?

539


What is request processor and how does it relates to action mapping?

582


Can we integrate struts with spring?

592


Briefly tell the two kinds of form beans.

565


What is the use of jsonvalidation in struts?

553