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
How is declarative handling of exceptions done in struts ?
What is the need of struts?
What is the different actions available in struts?
Why we use struts in java?
Is struts action class singleton?
What is struts and why it is used?
When do I need “struts.jar” on my classpath?
What is the use of struts config xml file?
What is the struts in java?
What are the loop holes of struts?
Are interceptors and filters different?
What is the purpose of @beforeresult annotation?
Name some useful annotations introduced in Struts2?
Why do we need mapdispatchtoprops?
What is the use of struts?