1
imn1 2014 年 7 月 7 日 这个有点难,因为你用的是相对路径,差集太大了
.//div[@xyz]//div[not(@xyz)] 这个能找出不带xyz属性的div子节点,但似乎不合你的题意 |
2
lins05 2014 年 7 月 7 日 './/div[@xyz]//*[not(self::div[@xyz])]'
|
3
binux 2014 年 7 月 7 日 .//div[@xyz and not(//div[@xyz])]
|
4
node OP |
6
imn1 2014 年 7 月 7 日
查了一下,@lins05那个应该是正解,你先测试一下
|
7
imn1 2014 年 7 月 7 日
|
9
node OP |
10
binux 2014 年 7 月 8 日
哦,我理解错了
那应该是 .//div[@xyz and not(ancestor::div[@xyz])] |