NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

XmlNode.PrependChild

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;

Parameters

newChild
The node to add. If it is a XmlDocumentFragment, the entire contents of the document fragment are moved into the child list of this node.

Return Value

The node added.

Exceptions

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.

Remarks

If the newChild is already in the tree, it is first removed.

See Also

XmlNode Class | XmlNode Members | System.NewXml Namespace