title: Unmarshalling an XML using Xpath expression and jaxb
body: <p>I am new to JAXB and would like to know if there is a way by which I can unmarshall an XML to my response object but using xpath expressions. The issue is that I am calling a third party webservice and the response which I receive has a lot of details. I do not wish to map all the details in the XML to my response object. I just wish to map few details from the xml using which I can get using specific XPath expressions and map those to my response object. Is there an annotation which can help me achieve this?</p>
  
  <p>For example consider the following response</p>
  
  <pre><code>&lt;root&gt;
    &lt;record&gt;
      &lt;id&gt;1&lt;/id&gt;
      &lt;name&gt;Ian&lt;/name&gt;
      &lt;AddressDetails&gt;
        &lt;street&gt; M G Road &lt;/street&gt;
      &lt;/AddressDetails&gt;
    &lt;/record&gt;  
  &lt;/root&gt;
  </code></pre>
  
  <p>I am only intrested in retrieving the street name so I want to use xpath expression to get value of street using 'root/record/AddressDetails/street' and map it to my response object</p>
  
  <pre><code>public class Response{
       // How do i map this in jaxb, I do not wish to map record,id or name elements
       String street; 
  
       //getter and setters
       ....
  }   
  </code></pre>
  
  <p>Thanks</p>