标签: dom xpath xpathquery
我想做一个负面的xpath查询:
$xpath->query(//a[DoesNotContain(@class,'some_class')]);
我知道这个
$xpath->query(//a[contains(@class,'some_class')]);
答案 0 :(得分:11)
$xpath->query(//a[not(contains(@class, 'some_class'))]);