JAXB XML ElementWrapper Plugin (original) (raw)

When generating XML schema from Java source code using the schemagen tool a common approach is to use the @XmlElementWrapper and @XmlElement annotations to handle schema generation for collections.

However, when generating Java source from a schema using the xjc tool the resulting code is not created with these annotations.

Instead, the generated Java source contains "injected" inner classes to accommodate the collection of elements contained within an element.

This plugins solve this by generating the corresponding @XmlElementWrapper annotation on corresponding fields to remove the need of nested inner classes.

Added in 4.0.1 version of JAXB-Tools.

Usage

You can also use the following switches to change the plugin behaviour :

See Using JAXB2 Basics Plugins.

Add a custom footer