可能重复:
xpath 表达式中的属性和 count()
跟随 xml -
<a m="1">
<b n="1" o="2">
<c p="3">3</c>
<d/>
</b>
<b n="1" o="2">
<c p="3">3</c>
<d q="3">
<e r="2">2</e>
</d>
<f s="1"/>
</b>
</a>
为什么count(/*/*//@*) = 9
呢?
有人可以计算按顺序检索到的所有节点吗?