【发布时间】:2018-07-16 17:43:17
【问题描述】:
<table>
<tr>
<th class="a">Name</th>
<th class="b">Old </th>
<th class="x">New</th>
</tr>
</table>
在上面使用 X-path 的 sn-p 中,我需要获取 "th"w.r.to "tr" 节点的索引,即 3.How我能做到吗?
我尝试使用
找到节点//aside//table//tr/th[text() = 'New']
但我不知道找到它的相对索引
是否有任何轴说明符来获取它的索引?
【问题讨论】: