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 is the purpose of @beforeresult?

600


Which class of struts is responsible to converts data types from string and vice versa?

654


How struts control data flow?

531


Explain struts.devmode?

557


What should be the name of xml file used for validation in struts?

532






Why use spring, if you are already using struts?

554


What does params interceptor?

523


Are actions thread safe?

532


Why are frameworks used?

526


What are the various struts tag libraries?

539


Can you give an overview of how a struts application flows?

522


What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?

559


What do you mean by actionservlet?

544


What is apache struts used for?

488


What is includeaction?

574