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


Please Help Members By Posting Answers For Below Questions

What are disadvantages of Struts?

544


how to debug struts project in netbean ?

1916


What is struts2 framework?

509


Which interceptor is responsible for file upload support?

573


What is the use of reset method of ActionForm class?

565






Mark the differences between html tags and strut specific html tags.

584


What is difference between struts1 and struts2?

493


What are pull and push mvc architecture and which architecture does struts2 follow?

504


What is strut web xml?

526


What helpers in the form of jsp pages are provided in struts framework?

523


Is struts action class singleton?

544


What applications use apache struts?

489


What is use of i18n interceptor?

536


What is the purpose of constant tag in struts.xml?

551


What is struts 2 framework in java?

537