what is the difference between SAX Parser and DOM Parser??

Answer Posted / ashish

DOM
1. Tree of nodes
2. Memory: Occupies more memory, preffered for small XML
documents
3. Slower at runtime
4. Stored as objects
5. Programmatically easy
6. Ease of navigation
SAX
1. Sequence of events
2. Doesn't use any memory preferred for large documents
3. Faster at runtime
4. Objects are to be created
5. Need to write code for creating objects
6. Backward navigation is not possible as it sequentially
processes the document

Is This Answer Correct ?    19 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the loop holes of struts?

560


What is the purpose of global-forwards tag in struct-config.xml?

580


What is the use of reset method of ActionForm class?

570


Explain how can we upload files in struts2 application?

621


Explain struts.devmode?

566






What is Struts2?

621


What configuration changes are required to use resource files in Struts?

569


What is dispatch action class?

607


What do struts do?

519


What are the benefits of the struts system?

575


What is the naming convention for a resource bundle file in struts2?

541


What is the purpose of @urlvalidator annotation?

555


What is the purpose of @expressionvalidator annotation?

594


How does struts2 token work?

525


Explain about struts?

553