Reputation: 193
I would like to do a negative xpath query like this:
$xpath->query(//a[DoesNotContain(@class,'some_class')]);
I know about this
$xpath->query(//a[contains(@class,'some_class')]);
Upvotes: 8
Views: 2431
Reputation: 15361
$xpath->query(//a[not(contains(@class, 'some_class'))]);
Upvotes: 12