How to write a xpath to match all elements except a particular element
- by Unmesh Kondolikar
I am writing an XSL transformation. I want to write a template which matches all the child elements of the document except one particular node. My xml looks like this -
<Document>
<NodeA><\NodeA>
<NodeB><\NodeB>
<ServiceNode><\ServiceNode>
<NodeX><\NodeX>
</Document>
I want to write a template that matches all nodes except ServiceNode i.e. NodeA to NodeX. How to write this Xpath to get -
<xsl:template match="ALL Nodex Except ServiceNode">