title: JAXB marshall a Collection to a XmlElement and a XmlAttribute in one step
body: <p>I would like to marshall a Collection as nested attributes.</p>
  
  <p>Right now I have:</p>
  
  <pre><code>@XmlElement(name="entry")
  public Collection&lt;Integer&gt; getSizes(){ ... }
  </code></pre>
  
  <p>which returns:</p>
  
  <pre><code>&lt;entry&gt;1&lt;/entry&gt;
  &lt;entry&gt;2&lt;/entry&gt;
  </code></pre>
  
  <p>But I would like to get:</p>
  
  <pre><code>&lt;entry id="1"/&gt;
  &lt;entry id="2"/&gt;
  </code></pre>
  
  <p>Is this possible without new classes?</p>