I am trying to unmarshall the following XML using JAXB:
For anybody who can not or does not want to use the plugin:
If you can live with a different XML structure, it's possible to avoid generating the extra wrapper classes by simply using maxoccurs="unbounded" and leaving out the containing element. Using the original example:
will produce a structure like this:
A name
A name 2
This will put a method on the Work type that returns a List object. Unfortunately the method is called getComposer instead of getComposers, but you can use annotations or custom bindings to fix that problem.