title: How to return the diagonal line in table with xpath query?
body: <p>given the following xml document:</p>
  <pre><code>&lt;table&gt;
    &lt;tr&gt;&lt;td&gt;A&lt;/td&gt;  &lt;td&gt;B&lt;/td&gt;  &lt;td&gt;C&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;1&lt;/td&gt;  &lt;td&gt;2&lt;/td&gt;  &lt;td&gt;3&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;a&lt;/td&gt;  &lt;td&gt;b&lt;/td&gt;  &lt;td&gt;c&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  <p>I am trying to write xpath query to get the diagonal line of the table.<br />
  I thought about the following query:  <code>//td[count(parent::td/preceding-sibling::tr)+1]</code>  But it's not working (it returns &quot;No Match!&quot; as result).</p>
  <p>In the example above, the query need to return <code>&lt;td&gt;A&lt;/td&gt; &lt;td&gt;2&lt;/td&gt; &lt;td&gt;c&lt;/td&gt;</code></p>
  <p>What is the problem with this query ?</p>