ProcessingInstruction.target as String
The target of an XML processing instruction.
// Assume example.xml has contents similar to the following: // <data> // <?myPITarget somePIData?> // </data> const node = cts.doc('example.xml').root.firstChild; if (node.nodeType === Node.PROCESSING_INSTRUCTION_NODE) { node.target } else { 'not a processing instruction' } // returns 'myPITarget'
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.