What is the xpath to use if I want to get the nodes that have a certain number of child nodes of a tag type?
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<p></p>
</tr>
<tr>
<td></td>
<p></p>
</tr>
</table>
For example, in the markup above, I want to get <tr>
tags that have 3 <td>
children. The xpath should return the 1st and 3rd <tr>
.