XMLDocument.nodeName as String
This is inherited from the XMLNode object.
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.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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.