Results 1 to 2 of 2
Thread: What to use (DOM or SAX)
- 11-26-2007, 08:06 PM #1Senior Member
- Join Date
- Nov 2007
- Rep Power
- 03-31-2008, 03:49 PM #2
I personally like to use DOM parse.
They both have their advantages and it all depends on exactly what you want to do.
DOM is quite heavy on memory. This is because it reads the entire document into memory before processing. DOM has the advantage of being able to insert or delete nodes and also has the ability to traverse in any direction.
SAX is a lot easier on memory and it parses Node by Node. The disadvantages are that you cannot insert or delete a node, and it will only traverse from top to bottom.
A Google search will reveal all!
ONJava.com -- Using DOM to Traverse XML
Let me know if you need any more help and I will post a few examples for you here.Did this post help you? Please me! :cool: