Loading TOC...

ProcessingInstruction.prefix

ProcessingInstruction.prefix as String

Summary

This is inherited from the XMLNode object.

Return the namespace prefix of this node.

Usage Notes

This property is defined for element and attribute nodes.

Example

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

// returns 'ns'

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