MarkLogic 9 Product Documentation
XMLNode.nodeName

XMLNode.nodeName as String

Summary

The DOM name of the node. For element and attribute nodes this is the string value of node name, for processing instructions it is the target, and for document, text, or comment nodes it is the literal "#document", "#text", or "#comment", respectively.

Example

const node = fn.head(xdmp.unquote(
  '<ns:parent xmlns:ns="/my/ns"><ns:child>content</ns:child></ns:parent>')).root;
node.firstChild.nodeName;

// returns 'ns:child'
Powered by MarkLogic Server | Terms of Use | Privacy Policy