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.CloneNode

Creates a duplicate of this node.

[Visual Basic]
MustOverride Public Function CloneNode( _
   ByVal deep As Boolean _
) As XmlNode
[C#]
public abstract XmlNode CloneNode(
   bool deep
);
[C++]
public: virtual XmlNode* CloneNode(
   bool deep
) = 0;
[JScript]
public abstract function CloneNode(
   deep : Boolean
) : XmlNode;

Parameters

deep
true to recursively clone the subtree under the specified node; false to clone only the node itself (and its attributes if the node is an XmlElement).

Return Value

The duplicate node.

Remarks

This method serves as a generic copy constructor for nodes. The duplicate node has no parent (ParentNode returns null).

Cloning an XmlElement copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes. However, this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child XmlText node. Cloning any other type of node simply returns a copy of this node.

See Also

XmlNode Class | XmlNode Members | System.NewXml Namespace