We have been using JAXB to generate XML to interface with a third party. This third party is asking that for one section we produce a set of 2 different 0-n XML Elements in a repeating fashion without parent-elements separating them. Here is an example of whats requested:
<education>
<code>ENG24</code>
<percentage>25</percentage>
<code>ENG25</code>
<percentage>20</percentage>
<code>SPA50</code>
<percentage>30</percentage>
<code>SPA60</code>
<percentage>25</percentage>
</education>
I cannot figure out a way to represent this type of XML with JAXB Java XML Binding. Is it at all possible to represent the above XML with JAXB Java XML Binding?
I am aware that the XML above is poorly designed but I cannot change the third party's mind to use and tags instead.
If JAXB XML binding is not going to work that I would be very thankful for suggestions of what library/tool to use instead to produce XML and to do the marshal/un-marshaling.
Thanks! Matt