任何人都可以建议一种 XPath 表达式格式,该格式返回一个字符串值,其中包含元素的某些合格子节点的连接值,但忽略其他:
<div>
This text node should be returned.
<em>And the value of this element.</em>
And this.
<p>But this paragraph element should be ignored.</p>
</div>
返回的值应该是一个字符串:
This text node should be returned. And the value of this element. And this.
这在单个 XPath 表达式中是否可行?
谢谢。