title: Conditional XPath matching
body: <p>I have some xml that looks like this...</p>
  
  <pre><code>   &lt;tbody&gt;
       &lt;tr&gt;
         &lt;td&gt;
           &lt;h5&gt;
             &lt;a class="foo" name="bar"&gt;This is the element I want to condition on.&lt;/a&gt;
           &lt;/h5&gt;
         &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;a href="/generic/generic"&gt;This is the element I want to match on&lt;/a&gt;
        &lt;td&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;&lt;/td&gt;
     &lt;/tr&gt;
    &lt;tbody&gt;
  </code></pre>
  
  <p>How do I match on the second  only the first 's name attribute is "bar", using xpath?</p>