ProcessingInstruction class

ProcessingInstruction class

The class represents a “processing instruction”, used in XML as a way to keep processor-specific information in the text of the document.

Inheritance: ProcessingInstructionCharacterDataNode

The ProcessingInstruction type exposes the following members:

Properties

PropertyDescription
node_typeGets the node type.
parent_nodeGets the parent node.
base_uriGets the absolute base URI of this node or null if the implementation wasn’t able to obtain an absolute URI.
owner_documentGets the document object associated with this node.
child_nodesGets the child nodes.
node_nameGets the name of this processing instruction.
node_valueGets or sets the value of this node, depending on its type.
text_contentGets or sets the the text content of this node and its descendants.
local_nameGets the local part of the qualified name of this node.
prefixGets or sets the namespace prefix of this node.
namespace_uriGets the namespace URI of this node.
has_child_nodesGets whether this node has any children.
previous_siblingGets the node immediately preceding this node. If there is no such node, this returns null.
next_siblingGets the node immediately following this node. If there is no such node, this returns null.
first_childGets the first child of this node. If there is no such node, this returns null.
last_childGets the last child of this node. If there is no such node, this returns null.
COMMENT_NODE
DOCUMENT_NODE
DOCUMENT_TYPE_NODE
ELEMENT_NODE
PROCESSING_INSTRUCTION_NODE
TEXT_NODE
lengthGets the number of 16-bit units that are available through data. This may have the value zero, i.e., CharacterData nodes may be empty.
dataGets or sets the character data of the node that implements this interface.

Methods

MethodDescription
append_child(node)Adds the node newChild to the end of the list of children of this node.
remove_child(node)Removes the child node indicated by old child from the list of children.
replace_child(node, child)Replaces the child node old child with new child in the list of children, and returns the old child node.
substring(offset, count)Extracts a range of data from the node.
append_data(data)Appends the string to the end of the character data of the node.
insert_data(offset, data)Inserts a string at the specified offset.
delete_data(offset, count)Removes a range of content from the node.
replace_data(offset, count, data)Replaces the characters starting at the specified offset with the specified string.

See Also