Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Differentiate between SAX(Simple API for XML) and DOM (Document Object Model) ?

0
Posted

Differentiate between SAX(Simple API for XML) and DOM (Document Object Model) ?

0

Here the textual information in the XML document gets turned into a bunch of tree nodes. DOM gives access to the information stored in XML document as a hierarchical object model. DOM creates a tree of nodes and we can access the information by interacting with this tree of nodes. SAX chooses to give you access to the information in the XML document, not as a tree of nodes, but as a sequence of events! SAX doesnt create a default object model on top of the XML document (like DOM does). This makes SAX faster, and also necessitates the following things to do: creation of your own custom object model which “holds all the information in the XML document . creation of a document handler class that listens to SAX events and makes sense of these events to create objects in the custom object model. All SAX requires is that the parser should read in the XML document, and fire a bunch of events depending on what tags it encounters in the XML document. The developer is responsible for interpretin

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.