Hello,
I'm using JAXB and xjc to compile my XML Schema into Java classes. I do not want to manually edit this generated classes. I have xml schema like that:
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="items">
<xs:complexType>
<xs:sequence>
<xs:element ref="item" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
The xjc generates a class Items
that only contains a list of Item
objects. Is there any chance to omit the class Items
and have a list of Item
objects directly in the Root
class?
I know that this can be done with @XMLElementWrapper
annotation, but I don't know how to tell xjc to create such.
Thanks for any suggestions!
Best regards, Markus