title: Xpath - selection based on multiple criteria
body: <p>I have the following XML File:</p>
  
  <pre><code>&lt;persons&gt;
     &lt;person name="shawn"&gt;
        &lt;age&gt;34&lt;/age&gt;
        &lt;hair style="spikes"&gt;red&lt;/hair&gt;
      &lt;/person&gt;
      &lt;person  name="mike"&gt;
         &lt;age&gt;36&lt;/age&gt;
         &lt;hair style="bald"&gt;red&lt;/hair&gt;
      &lt;/person&gt;
      &lt;person name="shawn"&gt;
         &lt;age&gt;38&lt;/age&gt;
         &lt;hair style="bald"&gt;red&lt;/hair&gt;
      &lt;/person&gt;
  &lt;/persons&gt;
  </code></pre>
  
  <p>Using XPath in C#, is it possible to select the person element where the name is "Shawn", and the hair style = "bald"? </p>
  
  <p>I tried using:</p>
  
  <pre><code>XElement.XPathSelectElement("//person[@name='shawn'] | //person/hair[@style='bald']
  </code></pre>
  
  <p>but that gives me a reference to the hair element, and not the person element. </p>
  
  <p>Thanks in advance :)</p>
  
  <p>Peter</p>