Adds the specified node to the beginning of the list of children of this node.
[Visual Basic] Overridable Public Function PrependChild( _ ByVal newChild As XmlNode _ ) As XmlNode [C#] public virtual XmlNode PrependChild( XmlNode newChild ); [C++] public: virtual XmlNode* PrependChild( XmlNode* newChild ); [JScript] public function PrependChild( newChild : XmlNode ) : XmlNode;
The node added.
Exception Type | Condition |
---|---|
HIERARCHY_REQUEST_ERR | This node is of a type that does not allow children of the type of the newChild node. Or the node to be added is one of this node's ancestors. |
WRONG_DOCUMENT_ERR | The newChild was created from a different document than the one that created this node. |
NO_MODIFICATION_ALLOWED_ERR | This node is read-only. |
If the newChild is already in the tree, it is first removed.