This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML Parsers 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 Parsers" Watch "XML Parsers" New topic

XML Parsers

Balachandar Nayak

Joined: Jul 22, 2005
Posts: 29
I need some details...with respect to the XML parsers listed below.

Out of these Parsers which one is good and why we need to go for it
(SAX, DOM, STAX,JAXP, Digester)

Advantages and disadvantages.. (Like STAX is good for parsing but in case of validation it doesn�t support schema � it supports schema but with the help of XMLBeans )

Basically I want to accomplish tasks like

1. Convertion of XML to Object
2. Object to XML
3. Validate xml with Schema

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Balachandar Nayak:

Out of these Parsers which one is good and why we need to go for it
(SAX, DOM, STAX,JAXP, Digester)

My understanding of the above mentioned stuffs.

SAX,DOM are two processing models within JAXP only.Even STAX is also included starting JAXP 1.3 that gets shipped with JDK1.5 onwards.

Digester is rule based parsing , specifically good for parsing of configuration files for projects and stuffs where you need rule based parsing and frequent changes to XML model.

I think JAXP 1.3 onwards validation process has be separated out from parsing , so you can use validation of it.

And regarding your other requirement , I think you need JAXB (google for castor) , or XMLBeans.

Hope this helps,

Rahul Bhattacharjee
LinkedIn - Blog
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: XML Parsers
It's not a secret anymore!