如何在 xhtml 文档中查找没有 id 和 class 属性的节点?
最佳答案
来自@astropanic(OP)的评论:
I want all li nodes that doesn't have id or class attributes
使用 :
//li[not(@id) and not(@class)]
这将选择所有
li
XML 文档中的元素,例如 li
元素没有 id
并且没有 class
属性。
关于xhtml - xpath 查找没有类和 id 的节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4512890/