次の XML フラグメントがあるとします。
<table>
<tbody>
<tr>
<td>
<strong>Specifications</strong>
</td>
</tr>
<tr>
<td>Finish</td>
<td>Black</td>
</tr>
<tr>
<td>Action</td>
<td>Semi-Automatic</td>
</tr>
<tr>
<td>Caliber</td>
<td>7.62mmX39mm</td>
</tr>
</tbody>
</table>
tr
その下のテキストを含まないすべての要素を選択しようとしていますSpecifications
が、XPath が恐ろしく、正しく取得できません。私は試した
//table/tbody/tr[not(contains(text(),'Specifications'))]
しかし、それは明らかにまだtr
含まれているノードを私に与えていますSpecifications
。