tags:

views:

788

answers:

2

I want to write something of the sort:

//a[not contains(@id, 'xx')]

(meaning all the links that there 'id' attribute doesn't contain the string 'xx')

I can't find the right syntax.

Thanks

+7  A: 

not() is a function in xpath (as opposed to an operator), so

//a[not(contains(@id, 'xx'))]
James Sulak
A: 

You should also check out the false() function which works in much the same way.

Micheál Healy