How to ignore namespace when selecting XML nodes with XPath

This is FAQ (but I’m lazy to search duplicates today)

In XPath 1.0

//*[local-name()='name']

Selects any element with “name” as local-name.

In XPath 2.0 you can use:

//*:name

Leave a Comment