Xml.XMLDoc.TXMLNode.CloneNode

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CloneNode(Deep: Boolean): IXMLNode;

C++

Xml::Xmlintf::_di_IXMLNode __fastcall CloneNode(bool Deep);

Properties

Type Visibility Source Unit Parent
function protected
Xml.XMLDoc.pas
Xml.XMLDoc.hpp
Xml.XMLDoc TXMLNode

Description

Creates a copy of this node and returns its interface.

Applications can't call the protected CloneNode method. To create a copy of this node, use the CloneNode method of this node's IXMLNode 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.

See Also