RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
IXMLNode.CloneNode Method

Creates a copy of this node and returns its interface.

Pascal
function CloneNode(Deep: Boolean): IXMLNode;
C++
__fastcall IXMLNode CloneNode(Boolean Deep);

CloneNode returns a copy of this node that has no parent. Any attributes of this node are copied as well, including attribute nodes that represent default values. 

Deep indicates whether the child nodes of this node should be cloned as well. For example, if an element node contains any text, CloneNode only copies then text when deep is true, because in the underlying DOM implementation, the text is contained in a child node. 

After calling CloneNode to create a new node, you can add that node into the ChildNodes property of another node (or, if this node represents an attribute, into the AttributeNodes property) by calling ChildNodes. ->Add or ChildNodes. ->Insert. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!