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

can anybody tell.what is the difference between Forward Action and Action Forward?

2 Answers   Polaris, TCS,


How Struts internally works? For Example if we type the URL "/login.do" how the process goes internaly? How the struts-config.xml loaded?

1 Answers   Allied Digital,


What does params interceptor?

0 Answers  


Do we need to pay the struts if being used in commercial purpose?

0 Answers  


Please can you tell me ,where can we used the MVC other than web applications.

1 Answers  






What do you mean by actionform?

0 Answers  


Hi All thanks in advance, iam new to j2ee currently in my project we r using struts with hibernate can i have one sample application like CRUD application with code or any tutorials liks r ebooks plz....?

1 Answers   IBM,


What is difference between spring and struts?

0 Answers  


What is the difference between RequestProcessor and RequestDispatcher?

11 Answers   Ness Technologies, TCS,


What is use of i18n interceptor?

0 Answers  


Which interceptor is responsible for mapping request parameters to action class Java Bean properties?

0 Answers  


What is http forward?

0 Answers  


Categories