title: JAXB XML repeating alternating XmlElements without Parent element
body: <p>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:</p>
  
  <pre><code>&lt;education&gt;
     &lt;code&gt;ENG24&lt;/code&gt;
     &lt;percentage&gt;25&lt;/percentage&gt;
     &lt;code&gt;ENG25&lt;/code&gt;
     &lt;percentage&gt;20&lt;/percentage&gt;
     &lt;code&gt;SPA50&lt;/code&gt;
     &lt;percentage&gt;30&lt;/percentage&gt;
     &lt;code&gt;SPA60&lt;/code&gt;
     &lt;percentage&gt;25&lt;/percentage&gt;
  &lt;/education&gt;
  </code></pre>
  
  <p>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?</p>
  
  <p>I am aware that the XML above is poorly designed but I cannot change the third party's mind to use  and  tags instead.</p>
  
  <p>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.</p>
  
  <p>Thanks!
  Matt</p>