Select nodes with names equal to or containing some string

Download xpath eBook

Syntax

  1. Inside a specific node:

    {path-to-parent}/name()='search string']

  2. Anywhere in the document:

    //*[name()='search string']

Parameters

functionreturn value
local-name()the node's name without prefix

Remarks

local-name() result does not include prefix (lookup name() XPATH function for it)

Related Examples

Stats

28 Contributors: 2
Monday, September 12, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook