Loading TOC...

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'

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