Reputation: 394
I have a class that contain two lists. I want to generate a wrapper element around the list elements, and around the two list.
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 generate a wrapper around the list with xml-element-wrapper but I can't wrap the two list into one element.
Is it possible to do this in JAXB and/or in the moxy implementation?
Upvotes: 5
Views: 511
Reputation: 394
After I asked the question I successfully solved the problem with the moxy's xml-path extension, but I'm still interested in the standard jaxb solution for this problem.
Upvotes: 2