I would like to select all elements that have a specific attribute or do not have it at all:
//job[@salary<"100" or !@salary ]
This code is not valid. Which one of? Thanks!
//job[@salary<"100" or not(@salary)]
There is no operator in xpath. See http://www.w3schools.com/xpath/xpath_operators.asp
//job[count(@salary) = 0]
I think:)
//job[@salary<"100" or count(@salary)=0]
Tested here and works great.