Start Setvalidating


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.

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.

Here's a command you can use to run the script that binds the schema: subdirectory).

Note that these classes are implementation-specific -- in this example, they are specific to the Reference Implementation.

All JAXB implementations provide a tool called a binding compiler to bind a schema (the way the binding compiler is invoked can be implementation-specific).

For example, the JAXB Reference Implementation provides a binding compiler that you can invoke through scripts.

JAXB requires that the XML document you want to access has a schema, and that schema is written in the W3C XML Schema Language (see the box "Why W3C XML Schema Language? Assume, for this example, that the Why W3C XML Schema Language?