background image

3. Using JAXB

<< Java-to-Schema | JAXB Usage Instructions >>
<< Java-to-Schema | JAXB Usage Instructions >>
11
3
Using JAXB
T
HIS
chapter provides instructions for using the sample Java applications that
are included in the
<javaee.tutorial.home>/examples/jaxb
directory. These
examples demonstrate and build upon key JAXB features and concepts. It is rec-
ommended that you follow these procedures in the order presented.
After reading this chapter, you should feel comfortable enough with JAXB that
you can:
· Generate JAXB Java classes from an XML schema
· Use schema-derived JAXB classes to unmarshal and marshal XML con-
tent in a Java application
· Create a Java content tree from scratch using schema-derived JAXB
classes
· Validate XML content during unmarshalling and at runtime
· Customize JAXB schema-to-Java bindings
The primary goals of the Basic examples are to highlight the core set of JAXB
functions using default settings and bindings. After familiarizing yourself with
these core features and functions, you may wish to continue with Customizing
JAXB Bindings (page 35)
for instructions on using Customize examples that
demonstrate how to modify the default JAXB bindings. Finally, the Java-to-
Schema examples show how to use annotations to map Java classes to XML
schema.