Loading TOC...

MarkLogic 12 EA 1 Product Documentation
fn:node-name

fn:node-name(
   $arg as node()?
) as xs:QName?

Summary

Returns an expanded-QName for node kinds that can have names. For other kinds of nodes it returns the empty sequence. If $arg is the empty sequence, the empty sequence is returned.

Parameters
arg The node whose name is to be returned.

Example

let $x := <hello><goodbye>1</goodbye></hello>
return
fn:node-name($x/child::element())

=> goodbye

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.