title: Unmarshal XML with dynamic root element using JAXB
body: <p>I'm trying to integrate with a third-party system and depending on the type of object, the root element of the returned XML document changes.  For example:</p>
  
  <pre><code>GET /objecttype1-1/ returns:
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;objecttype1 xmlns="path"&gt;
     &lt;id&gt;1&lt;/id&gt;
     &lt;description&gt;obj1&lt;/description&gt;
  &lt;/objecttype1&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>GET /objecttype2-3 returns:
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;objecttype2 xmlns="path"&gt;
     &lt;id&gt;3&lt;/id&gt;
     &lt;address&gt;home&lt;/address&gt;
  &lt;/objecttype2&gt;
  </code></pre>
  
  <p>Since the sub-elements are not guaranteed to be the same (other than id), I figured a List with <code>@XmlMixed</code> <code>@XmlAnyElement</code> will take care of them.  But how do I map the root elements?  <code>@XmlRootElement(name="???")</code></p>
  
  <p>Due to technology limitations, I'm not able to use EclipseLink/MOXy.  Thanks.</p>