Xml.XMLIntf.IXMLNode.CloneNode
Delphi
function CloneNode(Deep: Boolean): IXMLNode;
C++
virtual _di_IXMLNode __fastcall CloneNode(bool Deep) = 0 ;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Xml.XMLIntf.pas Xml.XMLIntf.hpp |
Xml.XMLIntf | IXMLNode |
Description
Creates a copy of this node and returns its interface.
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.