Skip to content

XML

XML - ignore namespaces & use local names instead:

http://stackoverflow.com/questions/4402310/how-to-ignore-namespace-when-selecting-xml-nodes-with-xpath

In XPath 1.0
//*[local-name()='name']
Selects any element with "name" as local-name.
In XPath 2.0 you can use:
//*:name

http://stackoverflow.com/questions/21239181/xpath-how-to-identify-an-attribute-in-a-predicate-in-a-namespace-unaware-way

/[local-name()='a']/[local-name()='b' and @*[local-name() = 'bar']=\"zar\"]

http://stackoverflow.com/questions/4440451/how-to-ignore-namespaces-with-xpath

You can use the local-name() XPath function. 
Instead of selecting a node like
    /path/to/x:somenode
you can select all nodes and filter for the one 
with the correct local name:
    /path/to/*[local-name() = 'somenode']