title: jaxb nested list elements returns null
body: <p>I am trying to convert xml to java object using following jaxb code.
  When i unmarshall the xml file i get value only for the version attribute in Settings element. Connections value is coming as null.
  Please help me find out my mistake(s).WHat more details can i add?
  PS:Kindly excuse my beginner level knowledge in java.</p>
  
  <p>XML File:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!DOCTYPE xml&gt;
  &lt;Settings version="3" xmlns="urn:Adapter-v3"&gt;
      &lt;Connections&gt;
      &lt;Connection name ="Dev" description="DEV"&gt;
        &lt;Share version="CS" siteURL="https://example.com" /&gt;
      &lt;/Connection&gt;    
      &lt;Connection name ="Dev1" description="DEV1"&gt;
        &lt;Share version="OM" siteURL="https://example.com" /&gt; 
      &lt;/Connection&gt;
  &lt;/Connections&gt;
  &lt;/Settings&gt;
  </code></pre>
  
  <p>POJO classes:</p>
  
  <pre><code>@XmlRootElement(name="Settings", namespace="urn:Adapter-v3")
  public class Settings {
  
      Connections connections;
      private String version;
  
      @XmlElement(name="Connections")
      public Connections getConnections() {
          return connections;
      }
  
      public void setConnections(Connections connections) {
          this.connections = connections;
      }
      @XmlAttribute(name="version")
      public String getVersion() {
          return version;
      }
  
      public void setVersion(String version) {
          this.version = version;
      }
  
  }
  @XmlRootElement(name="Connections ")
  public class Connections {
      List&lt;Connection&gt; connection;
  @XmlElement(name="Connection")  
  public List&lt;Connection&gt; getConnection() {
          return connection;
      }
      public void setConnection(List&lt;Connection&gt; connection) {
          this.connection = connection;
      }
  }
  @XmlRootElement(name="Connection")
  public class Connection {
      private String name;
      private String description;
      Share share;
  @XmlAttribute(name="name")
          public String getName() {
              return name;
          }
          public void setName(String name) {
              this.name = name;
          }
          @XmlAttribute(name="description")
          public String getDescription() {
              return description;
          }
          public void setDescription(String description) {
              this.description = description;
          }
          @XmlElement(name="Share")
          public Share getShare() {
              return share;
          }
          public void setShare(Share share) {
              this.share = share;
          }
  }
  @XmlRootElement(name="Share")
  public class Share {
  private String version;
  private String siteUrl;
  
  @XmlAttribute(name="version")
  public String getVersion() {
      return version;
  }
  public void setVersion(String version) {
      this.version = version;
  }
  @XmlAttribute(name="siteURL")
  public String getSiteUrl() {
      return siteUrl;
  }
  public void setSiteUrl(String siteUrl) {
      this.siteUrl = siteUrl;
  }
  
  }
  </code></pre>
  
  <p>MAIN FILE</p>
  
  <pre><code>public class JAXB {
      public static void main(String[] args) {
          JAXBContext jaxbContext;
          Settings ha = null;
          File fileName = new File("Config.xml");
  
          try {
          jaxbContext = JAXBContext.newInstance(Settings.class);
           Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
  
            ha = (Settings)jaxbUnmarshaller.unmarshal(fileName);
          }
          catch(JAXBException e) {
              e.printStackTrace();
  }}
  </code></pre>