I have a class containing two lists. I want to create a wrapper element around list items and around two lists.
class SomeClass {
private List<TypeA> listA;
private List<TypeB> listB;
}
<some-class>
<lists>
<list-a>
<element-from-list-a />
<element-from-list-a />
<element-from-list-a />
...
</list-a>
<list-b>
<element-from-list-b />
<element-from-list-b />
<element-from-list-b />
...
</list-b>
</lists>
</some-class>
I can create a wrapper around a list using xml-element-wrapper, but I cannot wrap two lists in one element.
Is it possible to do this in JAXB and / or in the moxy implementation?
source
share