title: Unmarshall part of XML
body: <p>I have this XML</p>
  
  <pre><code>&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
      &lt;soap:Body&gt;
          &lt;ns2:listItemsResponse xmlns:ns2="http://soap.ws.server.wst.fit.cvut.cz/"&gt;
              &lt;return&gt;
                  &lt;code&gt;OK&lt;/code&gt;
                  &lt;data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:type="ns2:items"&gt;
                      &lt;item&gt;
                          &lt;itemId&gt;1540041177&lt;/itemId&gt;
                          &lt;price&gt;5109&lt;/price&gt;
                      &lt;/item&gt;
                      &lt;item&gt;
                          &lt;itemId&gt;696734629&lt;/itemId&gt;
                          &lt;price&gt;5453&lt;/price&gt;
                      &lt;/item&gt;
                      &lt;item&gt;
                          &lt;itemId&gt;1853843391&lt;/itemId&gt;
                          &lt;price&gt;5088&lt;/price&gt;
                      &lt;/item&gt;
                  &lt;/data&gt;
              &lt;/return&gt;
          &lt;/ns2:listItemsResponse&gt;
      &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>and I want to unmarshall the <code>data</code> element to my POJO (not the whole XML, just the part of it). Is it possible with JAXB?</p>
  
  <pre><code>@XmlRootElement(name = "data")
  public class Data {
  
      private List&lt;Item&gt; items;
  
      public Data() {
      }
  
      @XmlElement(name = "item")
      public List&lt;Item&gt; getItems() {
          return items;
      }
  
      public void setItems(List&lt;Item&gt; items) {
          this.items = items;
      }
  
      @Override
      public String toString() {
          return "Data [" + (items != null ? "items=" + items : "") + "]";
      }
  
  }
  </code></pre>