且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

xpath 查找不包含子节点的节点

更新时间:2023-02-08 22:17:28

//a[not(img)]

如果可以的话,尽量避免使用 //.另请注意,这只会排除 直接 包含 imgs 的 as.

Try and avoid the // if you can, though. Also note this will only exclude as that directly contain imgs.