I have a problem on how to use max() function on XPath,
If consider following xml, I need to select the <tr> element which has maximum number of child <td> in it.
<doc>
<table>
<tbody>
<tr>
<td>aa</td>
<td>bb</td>
<td>cc</td>
<td>dd</td>
</tr>
<tr>
<td>nn</td>
<td>oo</td>
</tr>
<tr>
<td>qq</td>
<td>rr</td>
<td>ss</td>
<td>tt</td>
<td>uu</td>
<td>vv</td>
<td>xx</td>
<td>yy</td>
<td>zz</td>
</tr>
</tbody>
</table>
</doc>
SO I wrote following xpath query
tr[max(count(child::td))]
But it return no result. can anyone suggest me a query that I can get <tr> which has maximum number of child <td>s ?
trs have the same number oftds (and that is the maximum)?