File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
XML and Related Technologies
Difference between SAX and DOM parsers
Joined: Oct 07, 2003
Mar 29, 2005 23:11:00
Can anyone let me know what is the difference between SAX and the DOM parsers??
I hope to get some comments on this.
Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Joined: Jan 23, 2002
Mar 29, 2005 23:24:00
SAX is an event-based API, which means that a SAX parser generates events when making its way through an XML document.
DOM, on the other hand, is a tree-based API, which means that a DOM parser creates a
out of the elements it encounters while making its way through an XML document.
I'd recommend looking up articles named "Understanding SAX" and "Understanding DOM" at
Effective Unit Testing
Joined: Oct 18, 2004
Mar 30, 2005 02:18:00
Also SAX is for sequential access and DOM for random access. DOM requires more memory in case of big xml file.
I agree. Here's the link:
subject: Difference between SAX and DOM parsers
sax vs dom parsers
Difference between Sax and Dom Parser
SAX Vs DOM
how to validate xml using local xsd
What is the difference between SAX and DOM ?.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014