title: How can I add xml attributes to jaxb annotated class XmlElementWrapper?
body: <p>I have a class with a XmlElementWrapper annotation like:</p>
  
  <p>...</p>
  
  <pre><code>  @XmlElementWrapper(name="myList")
      @XmlElements({
      @XmlElement(name="myElement") }
      )
      private List&lt;SomeType&gt; someList = new LinkedList();
  </code></pre>
  
  <p>...
  This code produces XML like </p>
  
  <pre><code>&lt;myList&gt;
    &lt;myElement&gt; &lt;/myElement&gt;
    &lt;myElement&gt; &lt;/myElement&gt;
    &lt;myElement&gt; &lt;/myElement&gt;
  &lt;/myList&gt;
  </code></pre>
  
  <p>so far so good.</p>
  
  <p>But now I need to add attributes to the list tag to get XML like </p>
  
  <pre><code>&lt;myList number="2"&gt;
    &lt;myElement&gt; &lt;/myElement&gt;
    &lt;myElement&gt; &lt;/myElement&gt;
    &lt;myElement&gt; &lt;/myElement&gt;
  &lt;/myList&gt;
  </code></pre>
  
  <p>Is there a 'smart way to achieve this without creating a new class that contains represents the list?</p>