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

Answers were Sorted based on User's Feedback



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

Answer / jayaprakash

good explanation......
Thank you.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / 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

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

Answer / prem

Thank you to all to give the feedback about the differences
between the sax and dom.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / rajendra

1. s->does not store xml in memory
d->store the entire xml document in memory

2. s->top to bottom traversing
d->traverse in any direction

3. s->insert or delete node is possible
d->insert or delete node is not possible

4. s->especially for java
d->not only for java

5. s->event driven,fast & lightweight
d->tree structure,heavy weight to load & store

6. s->parse the document while reading
d->load the document in memory to parse

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More Struts Interview Questions

What is spring hibernate and struts in java?

0 Answers  


What’s the utilization of struts.xml configuration file?

0 Answers  


how to write uploadphoto in the insert update delete using struts? write code struts and jsp jdbc

1 Answers  


Can you explain custom tag?

0 Answers  


Hai all.Can i develope Struts action class without execute(-,- ,-,-)method.Ifd it's possible plz provide some sample code.

3 Answers   TCS,






What is the purpose of @createifnull annotation annotation?

0 Answers  


What steps are required to for an application migration from Struts1 to Struts2?

0 Answers  


how can u handle run time exceptions in struts and jsp plz explain briefly not single word answer?

2 Answers   TCS,


What is struts in j2ee?

0 Answers  


where you store password in banking project

1 Answers  


Can a reducer dispatch an action?

0 Answers  


what is the current salary package in India for a java programmer who has 2 years experience

7 Answers  


Categories