title: XPath where the requirements apply to deeper nodes than the ones in resulting set
body: <p>In my answer to another post in SO (here: <a href="https://stackoverflow.com/questions/1948552/sharepoint-2007-how-to-check-if-a-folder-exists-in-a-document-library/2005855#2005855">SharePoint 2007, how to check if a folder exists in a document library</a>) I had to parse an XML document with structure:</p>
  
  <pre><code>D:multistatus
  |--D:response
  |----D:propstat
  |-------D:prop
  |----------D:displayname
  |----------D:isFolder
  </code></pre>
  
  <p>Is it possible to construct an XPath statement that selects a set of such <code>D:response</code> elements that contain <code>D:displayname</code> equal to <code>"someName"</code> and <code>D:isFolder</code> is <code>"t"</code>?</p>
  
  <p>I know how to do it if I select all <code>D:response</code> elements and then loop through the result set, but I believe XPath is powerful enough to do that in more delicate way.</p>