title: Automatic XmlRootElement wrapper for list
body: <p>I have a simple class that I needed to marshall. The class is declared as:</p>
  
  <pre><code>@XmlRootElement  
  public class XMLUser...
  </code></pre>
  
  <p>Here's what I get:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;xmlUser&gt;
      &lt;login&gt;myLogin&lt;/login&gt;
      &lt;password&gt;myPass&lt;/password&gt;  
      &lt;role name="role1"/&gt;  
      &lt;role name="role2"/&gt;  
      &lt;role name="role3"/&gt;  
  &lt;/xmlUser&gt;
  </code></pre>
  
  <p>Now I want to have multiple users in one file but without the need to create a wrapper class myself, sort of like using @XmlElementWrapper but for a class instead of a field. I don't know if this is possible. </p>
  
  <p>So that I could marshall a List (or some object provided by jaxb) and I could end up with an xml like this (the <code>&lt;users&gt;</code> tag generated automatically):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;users&gt;
      &lt;xmlUser&gt;
          &lt;login&gt;login1&lt;/login&gt;
          &lt;password&gt;pass2&lt;/password&gt;
          &lt;role name="role1"/&gt;
          &lt;role name="role2"/&gt;
      &lt;/xmlUser&gt;
      &lt;xmlUser&gt;
          &lt;login&gt;login2&lt;/login&gt;
          &lt;password&gt;pass2&lt;/password&gt;
          &lt;role name="role1"/&gt;
          &lt;role name="role3"/&gt;
      &lt;/xmlUser&gt;
  &lt;/users&gt;
  </code></pre>
  
  <p>Any help is appreciated. </p>