【发布时间】:2019-03-20 17:26:15
【问题描述】:
考虑这个例子:
<foo attr1="dummy">
<bar1>
some text #{abc} some text
</bar1>
<bar2>
<bar2bar2>
some text #{def} some text
</bar2bar2>
</bar2>
</foo>
我需要一个 XPath 1.0 查询(不支持正则表达式),当节点是节点的(直接或间接)子节点时,搜索所有出现的 # {*} foo 属性为 attr1。换句话说,查询应该返回:
some text #{abc} some other text
some text #{def} some other text
【问题讨论】: