Exclude specific tag from selection in XPath
xml, xpath
Solution
/root/*[not(self::a)]
Problem
I know this is a simple question, but I can't figure it out. Consider the following simple XML document: ``` <root> <a></a> <b></b> <c></c> <a></a> <d></d> <e></e> <a></a> <a></a> </root> ``` What's the best way to select the nodes `<b>` through `<e>` using XPath? I'm looking for something like ``` /root/*[not(a)] ``` (which does not do the trick)