title: JAXB, How to unmarshal XML element as list instead of object?
body: <p>My application integrates with another application that produces XML , they gave me the XSD and sample XML</p>
  
  <p>I've a question regarding this piece:</p>
  
  <p>XSD :</p>
  
  <pre><code>&lt;element name="IubLink"&gt;
      &lt;complexType&gt;
          &lt;complexContent&gt;
              &lt;extension base="xn:NrmClassXmlType"&gt;
                  &lt;sequence&gt;
                      &lt;element name="attributes" minOccurs="0"&gt;
                          &lt;complexType&gt;
                              &lt;all&gt;
                                  &lt;element name="userLabel" minOccurs="0"/&gt;
                                  &lt;element name="iubLinkUtranCell" minOccurs="0"/&gt;
                                  &lt;element name="iubLinkNodeBFunction" minOccurs="0"/&gt;
                              &lt;/all&gt;
                          &lt;/complexType&gt;
                      &lt;/element &gt;
                      &lt;choice minOccurs="0" maxOccurs="unbounded"&gt;
                          &lt;element ref="xn:VsDataContainer"/&gt;
                      &lt;/choice&gt;
                  &lt;/sequence&gt;
              &lt;/extension&gt;
          &lt;/complexContent &gt;
      &lt;/complexType&gt;
  &lt;/element &gt;
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;un:IubLink id="Iub_RBS0087"&gt;
  &lt;un:attributes&gt;
      &lt;un:userLabel&gt;Iub_RBS0087&lt;/un:userLabel&gt;
      &lt;un:iubLinkUtranCell&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RNC04,ManagedElement=1,RncFunction=1,UtranCell=00871&lt;/un:iubLinkUtranCell&gt;
      &lt;un:iubLinkUtranCell&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RNC04,ManagedElement=1,RncFunction=1,UtranCell=00872&lt;/un:iubLinkUtranCell&gt;
      &lt;un:iubLinkUtranCell&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RNC04,ManagedElement=1,RncFunction=1,UtranCell=00873&lt;/un:iubLinkUtranCell&gt;
      &lt;un:iubLinkUtranCell&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RNC04,ManagedElement=1,RncFunction=1,UtranCell=00875&lt;/un:iubLinkUtranCell&gt;
      &lt;un:iubLinkUtranCell&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RNC04,ManagedElement=1,RncFunction=1,UtranCell=00876&lt;/un:iubLinkUtranCell&gt;
      &lt;un:iubLinkUtranCell&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RNC04,ManagedElement=1,RncFunction=1,UtranCell=00877&lt;/un:iubLinkUtranCell&gt;
      &lt;un:iubLinkNodeBFunction&gt;SubNetwork=ONRM_RootMo_R,SubNetwork=RNC04,MeContext=RBS0087,ManagedElement=1,NodeBFunction=1&lt;/un:iubLinkNodeBFunction&gt;
  &lt;/un:attributes&gt;
  &lt;xn:VsDataContainer id="1"&gt;
      &lt;xn:attributes&gt;
          &lt;xn:vsDataType&gt;vsDataIubEdch&lt;/xn:vsDataType&gt;
          &lt;xn:vsDataFormatVersion&gt;EricssonSpecificAttributes.12.26&lt;/xn:vsDataFormatVersion&gt;
          &lt;es:vsDataIubEdch&gt;
              &lt;es:edchDataFrameDelayThreshold&gt;60&lt;/es:edchDataFrameDelayThreshold&gt;
              &lt;es:userLabel&gt;1&lt;/es:userLabel&gt;
          &lt;/es:vsDataIubEdch&gt;
      &lt;/xn:attributes&gt;
  &lt;/xn:VsDataContainer&gt;
  </code></pre>
  
  <p></p>
  
  <p>In java , I want to get list of IubLinkUtranCell , but JAXB generated it like:</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "", propOrder = {
  
  })
  public static class Attributes {
  
      protected Object userLabel;
      protected Object iubLinkUtranCell;
      protected Object iubLinkNodeBFunction;
  </code></pre>
  
  <p>So I will get all IubLinkUtranCell as one Object ! , How could I loop over them ?</p>