10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

17<br />

CHAPTER 17<br />

JAXB Architecture<br />

Binding between XML Schema and <strong>Java</strong> Classes<br />

<strong>The</strong> <strong>Java</strong> Architecture for XML Binding (JAXB) provides a fast and convenient way to bind<br />

between XML schemas and <strong>Java</strong> representations, making it easy for <strong>Java</strong> developers to<br />

incorporate XML data and processing functions in <strong>Java</strong> applications. As part of this process,<br />

JAXB provides methods for unmarshalling XML instance documents into <strong>Java</strong> content trees,<br />

and then marshalling <strong>Java</strong> content trees back into XML instance documents. JAXB also<br />

provides a way to generate XML schema from <strong>Java</strong> objects.<br />

JAXB 2.0 includes several important improvements to JAXB 1.0:<br />

■ Support for all W3C XML Schema features. (JAXB 1.0 did not specify bindings for some of<br />

the W3C XML Schema features.)<br />

■ Support for binding <strong>Java</strong>-to-XML, with the addition of the javax.xml.bind.annotation<br />

package to control this binding. (JAXB 1.0 specified the mapping of XML Schema-to-<strong>Java</strong>,<br />

but not <strong>Java</strong>-to-XML Schema.)<br />

■ A significant reduction in the number of generated schema-derived classes.<br />

■ Additional validation capabilities through the JAXP 1.3 validation APIs.<br />

■ Smaller runtime libraries.<br />

This chapter describes the JAXB architecture, functions, and core concepts, and provides<br />

examples with step-by-step procedures for using JAXB.<br />

This section describes the components and interactions in the JAXB processing model.<br />

487

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!