July 8, 2011, 11:58 p.m.
posted by defun
Binding XML Schemas
This section describes the default XML-to-Java bindings used by JAXB. All of these bindings can be overridden on global or case-by-case levels by means of a custom binding declaration. See the JAXB Specification for complete information about the default JAXB bindings.
Simple Type Definitions
A schema component using a simple type definition typically binds to a Java property. Since there are different kinds of such schema components, the following Java property attributes (common to the schema components) include:
The rest of the Java property attributes are specified in the schema component using the simple type definition.
Default Data Type Bindings
The following sections explain the default schema-to-Java, JAXBElement, and Java-to-schema data type bindings.
The Java language provides a richer set of data type than XML schema. Figure lists the mapping of XML data types to Java data types in JAXB.
When XML element information can not be inferred by the derived Java representation of the XML content, a JAXBElement object is provided. This object has methods for getting and setting the object name and object value.
Figure shows the default mapping of Java classes to XML data types.