XPath使用示例

1、查找空节点
//*[not(text())]        表示内容为空的节点
//*[count(*)=0]         表示没有子节点的节点
"//*[count(*)=0 and not(text())]"  空节点,表示既没有内容,也没有子节点,但未排除包含属性的节点

原文地址:https://www.cnblogs.com/sdfkfkd/p/3591822.html