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

How do I create an xml tax return?

464


How do I use patreon rss feed?

481


What is cdata section in xml?

463


How do I export xml to excel?

456


If I start using xml namespaces, do I need to change my existing dtds?

470






How do you convert xsd to xslt?

484


What is an rss feed link?

458


What is difference between xml xsd and xslt?

462


How do I add an rss feed to my website?

458


Why xsl is used in xml?

491


Use of CSS in XML document?

530


How to transform an xml document into another xml document? : xslt

624


How to use filtering in xslt? : xslt

441


What is Coding? Difference between Coding & Tagging

3103


Can I use java to create or manage xml files?

523