Chapter 12. XPath 2.0 Node and Sequence Functions

Using Node Functions

The XPath 2.0 node functions let you handle nodes, and here's an overview of these functions:

  • fn:name returns the name of the specified node as an xs:string value.

  • fn:local-name returns the local name of the specified node as an xs:NCName value.

  • fn:namespace-uri returns the namespace URI as an xs:string value for a given node.

  • fn:number returns the value of the specified item converted to an xs:double value.

  • fn:lang returns a Boolean value, depending on whether the language of the context node (defined with the xml:lang attribute) matches the language passed to this function.

  • fn:root returns the root of the ...

Get XPath: Navigating XML with XPath 1.0 and 2.0 Kick Start now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.