title: Using jackson xml mapper to map java list in xml
body: <p>I've a problem with xml Mapper.
  I'm using the com.fasterxml.jackson.xml.XmlMapper library.
  Practically, this is my java bean that map the values in this way:</p>
  
  <pre><code>@JsonAutoDetect
  @JacksonXmlRootElement(localName ="Patient")
  public class Patient implements Serializable {
    private static final long serialVersionUID = -2981849269841429849L;
    @JsonProperty("patientId")
    @JacksonXmlProperty(isAttribute = true)
    private String patientId;
    @JsonProperty("patientName")
    @JacksonXmlProperty(isAttribute = true)
    private String patientName;
    @JacksonXmlProperty(localName = "Series")
    @JacksonXmlElementWrapper(useWrapping=false)
    private ArrayList&lt;Serie&gt; listSerie;
  }
  </code></pre>
  
  <p>and generate in the main class the xml with:</p>
  
  <pre><code>Wado mapp = new Wado();
  mapp.setvalue("bla bla");
  String xmlWado = new XmlMapper().writeValueAsString(wado);
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>&lt;Patient patientId="" patientName=""&gt;
  &lt;Series&gt;
  &lt;Series&gt;&lt;/Series&gt;
  &lt;Series&gt;&lt;/Series&gt;
  &lt;Series&gt;&lt;/Series&gt;
  &lt;/Series&gt;
  </code></pre>
  
  <p>that's not I was expected. I want:</p>
  
  <pre><code>&lt;Patient patientId="" patientName=""&gt;
  &lt;Series&gt;&lt;/Series&gt;
  &lt;Series&gt;&lt;/Series&gt;
  &lt;Series&gt;&lt;/Series&gt;
  </code></pre>
  
  <p>Any suggestions?</p>