我们可以修剪()xpath结果吗?
大家好,我对 XPATH 不太熟悉,有一个小问题:
如果我有一个如下所示的节点:
<books>
<book> book name. </book>
</books>
并且我要求这个表达式:
//books/book
那么,有没有办法让 xpath 返回 normalize-string()书名的版本? 例如,替换“书名。”并仅返回“书名”。没有任何尾随或前导空格? 这对于 xpath 来说是可能的吗?
Hi friends I am not very familiar with XPATH, and have a small question:
If I have a node that looks like this:
<books>
<book> book name. </book>
</books>
and I ask for this expression:
//books/book
then, is there a way for the xpath to return the normalize-string()'d version of the book name?
as in, replace " book name. " and return only "book name." without any trailing or leading spaces?
is that even possible with xpath.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不行吗?
Wouldn't this work?