Dev

Sunday, 13 December 2015

Difference between SAX and DOM

Both SAX and DOM are used to parse the XML document

SAX
DOM
It stands for Simple API for XML
It stands for Document Object Model
SAX is event-based 
DOM is tree model
In SAX, events are triggered when the XML is being parsed
In DOM, there are no events triggered while parsing.
Parses node by node
Stores the entire XML document into memory before processing
Doesn’t store the XML in memory
Occupies more memory
We can’t insert or delete a node
We can insert or delete nodes
Top to bottom traversing
Traverse in any direction.


No comments:

Post a Comment