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
Powered by MarkLogic Server | Terms of Use | Privacy Policy