Java/JAXB: Unmarshall XML attributes to specific Java objects



We got some exported data from legacy system and we need to import it to Java as objects via JAXB or something. Do you have any idea how to write any XmlAdapter for such case? Thank you very much!



<document>
<label1>Some text</label1>
<label2 multivalue="true">
<values count="1">
<value>Some other text</value>
</values>
</label2>
</document>

<document>
<label1 multivalue="true">
<values count="1">
<value>Some other text</value>
</values>
</label1>
<label2>Some text</label2>
</document>

No comments:

Post a Comment