
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'