XML DOM Question:

Explain the difference between DOM and SAX?

Tweet Share WhatsApp

Answer:

SAX parser works incrementally and generates events that are passed to the application. DOM parser reads the whole XML document and returns a DOM tree representation of xml document

In DOM the xml file is arranged as a tree and backward and forward search is possible In SAX traversing in any direction is not possible as Top to bottom approach is used.
SAX is essentially an API for reading XML, and not writing it. DOM allows you to read and write.

Download XML DOM PDF Read All 26 XML DOM Questions
Previous QuestionNext Question
List the features of DOM?Define DOM?