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!

XmlContainer.AddBefore

Adds a node before a given child node.

[Visual Basic]
Public Sub AddBefore( _
   ByVal child As XmlNode, _
   ByVal before As XmlNode _
)
[C#]
public void AddBefore(
   XmlNode child,
   XmlNode before
);
[C++]
public: void AddBefore(
   XmlNode* child,
   XmlNode* before
);
[JScript]
public function AddBefore(
   child : XmlNode,
   before : XmlNode
);

Parameters

child
The node to add.
before
The node in front of which to insert child.

Exceptions

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, if child does not belong to the same XML context as this element, or if the parent element of before is not this element.

Remarks

The node given by child is added to this element's child list immediately before the node given by before. If before is null, the node is added to the end of this element's child list. An exception is thrown if child is already parented. To re-parent a node, the node must first be removed from the old parent.

See Also

XmlContainer Class | XmlContainer Members | System.Xml Namespace | Add | Remove