Loading TOC...

fn.nodeName

fn.nodeName(
   $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

var x = fn.head(xdmp.unquote('<hello><goodbye>1</goodbye></hello>'));
fn.nodeName(x.xpath("/child::element()"));

=> hello (because the xdmp.unquote produces a ValueIterator 
          containing a document node, and the xpath starts at the
	  document node and selects the sequence of child elements,
	  which in this case is the root node named "hello")

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy