XML¶
XML - ignore namespaces & use local names instead:
In XPath 1.0
//*[local-name()='name']
Selects any element with "name" as local-name.
In XPath 2.0 you can use:
//*:name
/[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']