what is the difference between SAX Parser and DOM Parser??
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Why was reload removed from struts (since 1.1)?
What is the differences between struts1 and struts2?
what is difference between <bean:write> and <bean: message> tag
Is there a particularly good ide to use with struts?
Why actionservlet is singleton in struts?
What is role of action class?
What is the difference between empty default namespace and root namespace?
Briefly tell the two kinds of form beans.
If the framework doesn’t do what I want, can I request that a feature be added?
how to develop the submit and search operations in single jsp using struts?
What is the purpose of constant tag in struts.xml?
Is Struts Action class Thread Safe?