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
What is the mime type definition for atom files?
What is xml signature/encryption?
Why xml was created?
What is the main focus of xsl?
What is parent in pom xml?
What is an xml schema used for?
When should I use the default xml namespace instead of prefixes?
What is the best rss reader?
What are the hooks provided by xslt?
What are the basic rules to write xml document?
Where is my rss feed on wordpress?
Where is my rss feed?
Is xsd xml?
What is cdata in xml?
What is xsl in html?