我想选择所有 b where c2attr > 5
on c2 = text2
。在 Xpath 中,我写道:
a/b[c2 = text2 and c2attr >5]
但是,它并没有给我两个满足时的条件c2=text2
,c2attr >5
。它给了我每个具有c2attr >5
. 我应该如何写才能正确选择
b?
例如:
<a>
<b>
<c1>c1 text</c1>
<c2 c2attr="3">text1</c2>
<c2 c2attr="8">tex2</c2>
<c2 c2attr="50">text3</c2>
</b>
<b>
<c1>c1 text</b1>
<c2 c2attr="1">text4</c2>
<c2 c2attr="6">tex2</c2>
<c2 c2attr="10">text1</c2>
</b>
</a>
非常感谢!