Difference between DOM and SAX Parser in JAVA

Posted By: Matpal - June 09, 2011
Both SAX and DOM are used to parse the XML document. Both has advantages and disadvantages and can be used in our programming depending on the situation


1. Parses node by node

2. Doesnt store the XML in memory

3. We cant insert or delete a node

4. Top to bottom traversing


1. Stores the entire XML document into memory before processing

2. Occupies more memory

3. We can insert or delete nodes

4. Traverse in any direction.


Post a Comment

Note: Only a member of this blog may post a comment.