XPath: select child elements that do *not* have a specific name
XpathXpath Problem Overview
<a>
<b/>
<c/>
<d/>
<b/>
<e/>
</a>
How do I select those children of "a" that are not "b"?
Xpath Solutions
Solution 1 - Xpath
/a/*[not(self::b)]
Solution 2 - Xpath
With XPath 2.0 you can even do
/a/(* except b)
Solution 3 - Xpath
Xpath will look:
a/*[name(.) !='b']
So, select children of 'a' whose name is not equal 'b'