title: How to find an element value based on another elements attribute value in XPath
body: <p>I am trying to learn XPath, and finding it difficult, as I am Googling my way through it all. 
  Here is my XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;details&gt;
          &lt;signature id="sig1"&gt;
              &lt;name&gt;mr. Barry Smith&lt;/name&gt;
              &lt;telephone type="fixed"&gt;01234 123456&lt;/telephone&gt;
              &lt;telephone type="mobile"&gt;071234562&lt;/telephone&gt;
          &lt;/signature&gt;
  
          &lt;signature id="sig2"&gt;
              &lt;name&gt;mr. Harry Smith&lt;/name&gt;
              &lt;telephone type="fixed"&gt;01234 123456&lt;/telephone&gt;
          &lt;/signature&gt;
      &lt;/details&gt;
  </code></pre>
  
  <p>How can I find the names of people who have a mobile phone, I can get either or, but not both.</p>
  
  <p>I have been trying things like this:</p>
  
  <pre><code>staffdetails/signature/telephone[@type='mobile']name
  </code></pre>
  
  <p>Also, is there a reference guide for using XPAth, so I can easily figure out any query I wish? Using online tutorials I have found explain how XPath works, but the examples don't cover enough.</p>
  
  <p>Thank you!</p>