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 |
struts 1.3 features?
What is action class?
What’s the difference between struts and turbine?
What is front controller in struts2?
we have two applications A1 & A2 both are accesing the same databse table employee at the same time how we will manage this so that both application can get the correct no of emloyee while A1 is inserting a employee at the same time while other applicatuion is getting the empployee list.
What is package name in struts xml?
What is the default suffix for struts2 action uri ?
Is form beans are serializable or not?
11 Answers College School Exams Tests, Magna Infotech,
How to forward from Array List to Jsp in Struts ActionServlet class?
What are the features of struts 2?
How nested beans can be used in Struts applications?
How Struts internally works? For Example if we type the URL "/login.do" how the process goes internaly? How the struts-config.xml loaded?