Loading TOC...

XMLNode.textContent

XMLNode.textContent as String

Summary

The DOM text value of the node.

Usage Notes

The main difference between this and nodeValue is that textContent of element nodes is the string value of the element rather than null.

Example

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'

Comments

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