Microsoft XML SDK 2.6 - XML Reference

XMLDOMProcessingInstruction Object

Represents a processing instruction, which XML defines to keep processor-specific information in the text of the document.

Remarks

The content of the ProcessingInstruction node is the entire content between the delimiters of the processing instruction (PI).

The content of this node is usually subdivided into the target (the application to which this processing instruction is directed) and the content of the processing instruction. The target consists of the first token following the start of the tag, while the content of the PI refers to the text that extends from the first nonwhite-space character after the target through the character immediately preceding the ?>, which signifies the end of the tag.

Example

The following example creates a new XMLDOMProcessingInstruction object and displays its XML representation:

Dim xmlDoc
Dim pi
Set xmlDoc = CreateObject("msxml2.DOMDocument")
Set pi = xmlDoc.createProcessingInstruction("xml", "version=""1.0""")
MsgBox pi.xml

Output ( in a message box )

<?xml version=”1.0”?>

See Also

Properties, Methods, and Events

DOMDocument Object