sku != preceding::sku Returns true if there is at least one child sku element with a string-value that does not equal that os one of the preceding sku elements. not(sku = preceding::sku) Return true if there is not a single child sku element with a string-value that equals that of one of the preceding sku elements.
In XML Quick Reference , they say these two are not equal. How ?
The ! and not do seem a little strange in xpath and need to be read carefully. It's one of the common gotchas. Consider the following 2 xpaths:-
1) //author[ @age != "34" ] 2) //author[ not(@age = "34") ] The first example selects all author element nodes whose age attributes' do not equal 34. The second will select all authors that do not have an age attribute whose value is 34 OR who do not have an age attribute. So an element like <author></author> will be selected by xpath 2 but not by xpath 1. You need to read the xpath carefully:- 1) select all author elements where the age attribute is not equal to 34.
2)all author elements which do not have an age attribute with the value 34.
"....bigmouth strikes again, and I've got no right to take my place with the human race...."<p>SCJP 1.4
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter