samples/catalog-resolverThis example demonstrates how to use the
-catalog compiler switch to handle
references to schemas in external web sites.
samples/character-escapeThis example shows how you can use the new JAXB
RI Marshaller property
org.glassfish.jaxb.characterEscapeHandler
to change the default character escaping
behavior.
samples/class-resolverThis little DI-container-by-JAXB example
demonstrates how one can avoid passing in a list of
classes upfront, and instead load classes
lazily.
samples/create-marshalThis sample application demonstrates how to use
the ObjectFactory class to create a
Java content tree from scratch and marshal it to XML
data. It also demonstrates how to add content to a
JAXB List property.
samples/cycle-recoveryEclipse Implementation of JAXB's vendor extension
CycleRecoverable provides
application a hook to handle cycles in the object
graph. Advanced.
samples/datatypeconverterThis sample application is very similar to the
inline-customize sample application (formerly
SampleApp6), but
illustrates an easier, but not as robust,
<jaxb:javaType>
customization.
samples/dtdThis sample application illustrate some of the
DTD support available in the Eclipse Implementation of JAXB's extension mode.
Please refer to the Eclipse Implementation of JAXB Extensions page for more
detail.
samples/element-substitutionThis sample application illustrates how W3C XML
Schema substitution groups are supported in Eclipse Implementation of JAXB's
extension mode. Please refer to the Eclipse Implementation of JAXB Extensions page for more
detail.
samples/external-customizeThis sample application is identical to the
datatypeconverter sample
application (formerly
SampleApp7) except that the
binding customizations are contained in an external
binding file.
samples/fix-collidesAnother binding customization example that
illustrates how to resolve name conflicts. Running
this sample without the binding file will result in
name collisions (see readme.txt)
. Running ant will use the
binding customizations to resolve the name conflicts
while compiling the schema.
samples/inline-customizeThis sample application demonstrates how to
customize the default binding produced by the XJC
binding compiler.
samples/j2s-crete-marshalThis sample application demonstrates
marshalling, unmarshalling and unmarshal validation
with existing Java classes annotated with JAXB
annotations.
samples/j2s-xmlAccessorOrderThis sample application demonstrates the use of
mapping annotations
@XmlAccessorOrder and
@XmlType.propOrder in Java classes
for ordering properties and fields in Java to schema
bindings.
samples/j2s-xmlAdapterThis sample application demonstrates the use of
interface XmlAdapter and annotation
XmlJavaTypeAdapter for custom
marshaling/unmarshaling XML content into/out of a Java
type.
samples/j2s-xmlAttributeThis sample application demonstrates the use of
annotation @XmlAttribute for
defining Java properties and fields as XML
attributes.
samples/j2s-xmlRootElementThis sample application demonstrates the use of
annotation @XmlRootElement to
define a class to be an XML element.
samples/j2s-xmlSchematTypeThis sample application demonstrates the use of
annotation @XmlSchemaType to
customize the mapping of a property or field to an XML
built-in type.
samples/j2s-xmlTypeThis sample application demonstrates the use of
mapping annotations
@XmlAccessorOrder and
@XmlType.propOrder in Java classes
for ordering properties and fields in Java to schema
bindings.
samples/locator-supportThis sample shows how to use the new
non-standard locator support. By following the
instructions in the readme.txt file, you can cause all
of the generated impl classes to implement a new
interface that provides more information about error
locations. When a ValidationEvent
happens on your content tree, simply retrieve the
object and cast it down to
com.sun.xml.bind.extra.Locatable.
samples/modify-marshalThis sample application demonstrates how to
modify a java content tree and marshal it back to XML
data.
samples/namespace-prefixThis sample application demonstrates how to use
the new Eclipse Implementation of JAXB Marshaller property
org.glassfish.jaxb.namespacePrefixMapper
to customize the namespace prefixes generated during
marshalling.
samples/partial-unmarshallingIn this example, the input document will be
unmarshalled a small chunk at a time, instead of
unmarshalling the whole document at once.
samples/pull-parserThis sample app demonstrates how a pull-parser
can be used with JAXB to increase the flexibility of
processing.
samples/streaming-unmarshallingThis example illustrates a different approach to
the streaming unmarshalling, which is suitable for
processing a large document.
samples/synchronized-methodsThis sample shows how to use the new
non-standard synchronized method support. By following
the instructions in the
readme.txt, you can cause all of
the generated impl class methods signatures to contain
the synchronized keyword.
samples/type-substitutionThis sample app demonstrates type substitution
using the W3C XML Schema Part 0: Primer international
purchase order schema.
samples/ublThis project processes a UBL (Universal Business
Language) order instance and prints a report to the
screen.
samples/unmarshal-readThis sample application demonstrates how to
unmarshal an instance document into a Java content
tree and access data contained within it.
samples/unmarshal-validateThis sample application demonstrates how to
enable validation during the unmarshal
operations.
samples/updateablePartialBindThis sample application demonstrates how to
partially map a DOM tree to JAXB (using JAXP 1.3
XPath), modify JAXB mapped instance and then update
modifications back to the DOM tree.
samples/vendor-extensionsThis example demonstrates how to use
<xjc:superClass> vendor
extensions provided by Eclipse Implementation of JAXB's, as well as
<jaxb:serializable>
customization.
samples/xml-channelThis example demonstrates how one can use one
communication channel (such as a socket) to send
multiple XML messages, and how it can be combined with
JAXB.
samples/xml-stylesheetA common customization need for the marshalling
output is about introducing extra processing
instruction and/or DOCTYPE
declaration. This example demonstrates how such
modification can be done easily.