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 struts 2 framework in java?
In how many ways duplicate form submission can occurs?
What is the purpose of '@keyproperty'?
How is forward action used for integration?
Difference between html tags and struts specific html tags
What is the difference between Jakarta Struts and Apache Struts? Which one is better to use?
What is difference between struts1 and struts2?
Can we have more than one struts-config.xml file for a single struts application?
What is the purpose of @requiredstringvalidator?
Is struts 1 still supported?
What’s the difference between struts and turbine? What’s the difference between struts and espresso?
How struts control data flow?
What are the reasons for an error message not being displayed while developing struts application?
What is the use of reset method of ActionForm class?
What are the features of struts 2?