
XMLNode.textContent as String
The DOM text value of the node.
textContent
of element nodes is the string value of the element rather than null.
cts.doc("example.xml").root.firstChild.nodeValue;
const node = fn.head(xdmp.unquote(
'<ns:parent xmlns:ns="/my/ns"><ns:child>some content</ns:child></ns:parent>'))
.root;
node.textContent;
// returns 'some content'
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.