title: XPath: Selecting elements having a child at a specified position of a specified type
body: <p>Looking at the following XML-Example:</p>
  
  <pre><code>&lt;bookstore&gt;
      &lt;book&gt;
          &lt;title lang="eng"&gt;Harry Potter&lt;/title&gt;
          &lt;price&gt;29.99&lt;/price&gt;
      &lt;/book&gt;
      &lt;book&gt;
          &lt;price&gt;39.95&lt;/price&gt;
          &lt;title lang="eng"&gt;Learning XML&lt;/title&gt;
      &lt;/book&gt;
  &lt;/bookstore&gt; 
  </code></pre>
  
  <p>Using XPath i wan't to select all books with first child being a title element and second child being a price element. This would return the first book in the example.</p>
  
  <p>I tried the following expression:</p>
  
  <pre><code>book[title[1] and price[2]]
  </code></pre>
  
  <p>But this expression doesn't match, because it's selecting all books with at least one title element and with at least two price elements. How can i change this expression to select all books with first child being a title element and second child being a price element?</p>