DOM & SAX parsers explanation and difference ?

Answer Posted / sangeri

DOM parser

1.In DOM parser the representation is in the memory as it
is used for the internal representation of an
XML document.
2.It reads the whole document and returns a DOM tree
representation of the
XML document.
3.So for smaller xml we can use DOM as memory is the
constraint.

SAX parser

1.It is event driven
2.It works incrementally and generates events that are
passed to the application.
3.For huge
XML we can go for SAX rather than DOM
4.It does not give any structural representation for the
XML document.

So depending on the application you develop you can choose
any of the parser

Is This Answer Correct ?    31 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is xml such an important development?

586


How do I convert xml to text?

573


Briefly explain the xml spy 2005 multitool.

589


Can we frame our own xml tags?

767


Write a program to use the stylesheet element?

537






How you define template in XSLT?

618


What is xml coding?

482


What is difference between xsd and wsdl?

532


Explain about xml namespaces?

605


Do xml namespace declarations apply to dtds?

582


How do I export xml to excel?

525


What is xml httprequest? What are its advantages?

559


What are xsl files?

573


What is the information contained inside the xml file?

544


How do I find rss feeds?

560