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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With