Java validating parser

In the DOM approach, the parser creates a tree of objects that represents the content and organization of data in the document. The application can then navigate through the tree to access the data it needs, and if appropriate, manipulate it.Now developers have another Java API at their disposal that can make it easier to access XML documents: Java Architecture for XML Binding (JAXB).

There is no need to create and use a parser and no need to write a content handler with callback methods.

A Reference Implementation of the API is now available in the Java Web Services Developer Pack V 1.1.

Let's look at JAXB in action, and compare it to SAX and DOM-based processing.

Java developers can invoke a SAX or DOM parser in an application through the JAXP API to parse an XML document -- that is, scan the document and logically break it up into discrete pieces.

The parsed content is then made available to the application.

Leave a Reply