what is the difference between SAX Parser and DOM Parser??
Answer Posted / penchala
Both SAX and DOM are used to parse the XML document. Both
has advantages and disadvantages and can be used in our
programming depending on the situation
SAX:
1. Parses node by node
2. Doesnt store the XML in memory
3. We cant insert or delete a node
4. Top to bottom traversing
DOM
1. Stores the entire XML document into memory before processing
2. Occupies more memory
3. We can insert or delete nodes
4. Traverse in any direction.
If we need to find a node and doesnt need to insert or
delete we can go with SAX itself otherwise DOM provided we
have more memory.
| Is This Answer Correct ? | 197 Yes | 11 No |
Post New Answer View All Answers
What is apache struts framework?
Do I have to credit struts on my own website?
What is the purpose of @key?
What is validate() and reset() functions?
What does apache struts do?
Is there a particularly good ide to use with struts?
What is struts xml?
Why do we need struts?
What are disadvantages of Struts?
What is actionservlet?
What are the classes used as part of struts framework ?
Are interceptors and filters different?
How can you create your custom interceptor in struts 2?
Are struts and shocks the same?
How you will enable front-end validation based on the xml in validation.xml?