title: XPath expression to verify a NodeList
body: <p>I have a NodeList in Java and this XML file, (just a part of it)</p>
  
  <p>if I have </p>
  
  <pre><code>&lt;Book title="aaa" author="bbb" price="12" year="2011" /&gt;
  </code></pre>
  
  <p>I can use an XPath expression to see if some conditions are verified, for example:</p>
  
  <pre><code>local-name(.) = 'Book' and @title local-name(.) = 'Book' and @title
  </code></pre>
  
  <p>If the result of XPath expression execution is true...do something, otherwise do something else.
  In this case I built an expression directly on a Node, and that's ok.</p>
  
  <p>In the case of NodeList, how can I do the same task?
  I would like to see if NodeList (org.w3c.NodeList in Java) has some nodes, for example, but using an XPath expression.</p>
  
  <p>Thanks
  Luca</p>