Xml.xmldom.IDOMNode.cloneNode

From RAD Studio API Documentation
Jump to: navigation, search


Delphi

function cloneNode(deep: WordBool): IDOMNode; safecall;

C++

virtual HRESULT __safecall cloneNode(System::WordBool deep, _di_IDOMNode &__cloneNode_result) = 0 ;

Properties

Type Visibility Source Unit Parent
function public
Xml.Xmldom.pas
Xml.xmldom.hpp
Xml.xmldom IDOMNode

Description

Returns a duplicate of this node.

Use cloneNode to obtain a copy of this node. The cloneNode method returns a copy of this node that has no parent. Any attributes are copied as well, including any 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 the text is contained in a child node of type TEXT_NODE.

Note: When cloning an attribute node directly (as opposed to copying the attributes when cloning an element node), the returned node's specified property is always true, even if this node does not represent a specified attribute.

Note: Cloning an immutable subtree produces a mutable copy, but the children of an entity-reference node are read-only.

Note: DOM implementations may differ in the way they clone nodes of type DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ENTITY_NODE, and NOTATION_NODE.

See Also