title: Jackson XML Parsing
body: <p>Jackson 2.2.3</p>
  
  <p>First, please excuse the stupid mistakes, I'm on a disconnected network, so I had to retype manually)</p>
  
  <p>I have the following XML:</p>
  
  <pre><code>&lt;orgs&gt;
      &lt;org name="Test1"&gt;
          &lt;item&gt;a&lt;/item&gt;
          &lt;item&gt;b&lt;/item&gt;
      &lt;/org&gt;
      &lt;org name="Test2"&gt;
          &lt;item&gt;c&lt;/item&gt;
          &lt;item&gt;d&lt;/item&gt;
          &lt;item&gt;e&lt;/item&gt;
      &lt;/org&gt;
  &lt;/orgs&gt;
  </code></pre>
  
  <p>I have the following class to parse this:</p>
  
  <pre><code>@XmlRootElement(name = "orgs")
  @XmlAccessorType(XmlAccessType.FIELD)
  public class XmlOrgElements {
  
      private List&lt;Org&gt; orgs;
  
      public List&lt;Org&gt; getOrgs() {
          return orgs;
      }
  
      public void setOrg(List&lt;Org&gt; orgs) {
          this.orgs = orgs;
      }
  
      public class Org {
          @JacksonXmlProperty(isAttribute = true)
          private String name;
          private List&lt;Item&gt; items;
  
          public String getName() {
              return name;
          }
  
          public void setName(String name) {
              this.name = name;
          }
  
          public List&lt;Item&gt; getItems() {
              return items;
          }
  
          public void setName(List&lt;Item&gt; items) {
              this.items = items;
          }
      }
  
      public class Item {
          @JacksonXmlText
          private String item;
  
          public String getItem() {
              return item;
          }
  
          public void setItem(String item) {
              this.item = item;
          }
      }
  }
  </code></pre>
  
  <p>But all I'm getting back is "orgs=null". Does anyone know why? </p>