processingInstruction object
Represents a processing instruction for an XML parser.
![]() ![]() |
Members
The processingInstruction object has these types of members:
Methods
The processingInstruction object has these methods.
| Method | Description |
|---|---|
| appendChild |
Appends an element as a child to the object. |
| cloneNode |
Copies a reference to the object from the document hierarchy. |
| compareDocumentPosition |
Compares the position of two nodes in a document. |
| insertBefore |
Inserts an element into the document hierarchy as a child node of a parent object. |
| isSameNode |
Determines if two node references refer to the same node. |
| isSupported |
Returns a value indicating whether or not the object supports a specific DOM standard. |
| removeChild |
Removes a child node from the object. |
| removeNode |
Removes the object from the document hierarchy. |
| replaceChild |
Replaces an existing child element with a new child element. |
| replaceNode |
Replaces the object with another element. |
| swapNode |
Exchanges the location of two objects in the document hierarchy. |
Properties
The processingInstruction object has these properties.
| Property | Description |
|---|---|
|
Gets the data of a processing instruction. | |
|
Gets a reference to the first child in the childNodes collection of the object. | |
|
Gets a reference to the last child in the childNodes collection of an object. | |
|
Retrieves the local name of the fully qualified XML declaration for a node. | |
|
Retrieves the namespace URI of the fully qualified XML declaration for a node. | |
|
Retrieves a reference to the next child of the parent for the object. | |
|
Gets the name of a particular type of node. | |
|
Retrieves the type of the requested node. | |
|
Gets or sets the value of a node. | |
|
Retrieves the document object associated with the node. | |
|
Retrieves the parent object in the document hierarchy. | |
|
Retrieves the local name of the fully qualified XML declaration for a node. | |
|
Gets a reference to the previous child of the parent for the object. | |
|
Gets the target of a processing instruction. | |
|
Sets or retrieves the text content of an object and any child objects. |
Standards information
Remarks
A processing instruction provides direction to an XML parser. The following code example shows a processing instruction that is specified in markup.
<?xml-stylesheet type="text/css" href="style.css"?>
Use the createProcessingInstruction method of a document to create an instance of an ProcessingInstruction object.
See also

