jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes XML parser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML parser" Watch "XML parser" New topic

XML parser

arbitha jeeva

Joined: Dec 05, 2009
Posts: 1
which is best SAX or DOM?
Jelle Klap

Joined: Mar 10, 2008
Posts: 1951

It depends. They both have their advantages and drawbacks.
There's really no way to answer your question without a specific case to apply it to.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Browse through recent posts in this forum, many of the topics are related to deciding which problem requires which parser.

Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
The Simple API for XML (SAX) and the Document Object Model (DOM) API are not eXtensible Markup Language (XML) parsers. They are application programming interfaces (API) which comunicate with an XML parser.

Which API is best, SAX or DOM, depends mostly upon specific requirements for a specific implementation. This includes things like the structure of the XML-based language to be processed, the average file-size of the instance document to be processed, and what type of processing need to execute.

I agree. Here's the link: http://aspose.com/file-tools
subject: XML parser
It's not a secret anymore!