Adds a node to the child list of this element.
[Visual Basic] Public Sub Add( _ ByVal child As XmlNode _ ) [C#] public void Add( XmlNode child ); [C++] public: void Add( XmlNode* child ); [JScript] public function Add( child : XmlNode );
Exception Type | Condition |
---|---|
ArgumentException | If child is null, if the Parent property of child is non-null, if child is already in the parent chain of this element, or if child does not belong to the same XML context as this element. |
The node given by child is added to the end of this element's child list. An exception is thrown if the given node is already parented. To re-parent a node, the node must first be removed from the old parent.
XmlContainer Class | XmlContainer Members | System.Xml Namespace | AddBefore | Remove