title: JAXB: How to add a Wrapper around XmlRootElement?
body: <p>How can I annotate a Bean for JAXB if I want to use such an XML file?</p>
  
  
  
  <pre><code>&lt;myobjects&gt;
      &lt;myobject id="1" active="true"&gt;
          &lt;...&gt;
      &lt;/myobject&gt;
      &lt;myobject id="2" active="true"&gt;
          &lt;...&gt;
      &lt;/myobject&gt;
      ...
      &lt;myobject id="666666" active="true"&gt;
          &lt;...&gt;
      &lt;/myobject&gt;
  &lt;/myobjects&gt;
  </code></pre>
  
  <p>...a list/collection of <em>XmlRootElements</em> is to be mapped to...</p>
  
  <pre><code>@XmlRootElement(name="myobject")
      public class XmlMyObjectDTO {
      private long id;
  
      public long getId() {
          return this.id;
      }
  ...
  }
  </code></pre>