gpt4 book ai didi

xml - XPath匹配叶节点

转载 作者:行者123 更新时间:2023-12-03 17:00:27 25 4
gpt4 key购买 nike

我想编写一个XPath表达式,如果它是叶节点则返回true。

我该怎么做到..

//a[not(node()] 


这样的东西?

谢谢

最佳答案

当且仅当上下文节点没有子节点时,返回true的表达式为:

not(child::node())

关于xml - XPath匹配叶节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10585027/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com