[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Laz2_DOM' (#lazutils)

TDOMEntity.CloneNode

Makes a copy of the DOM node with the specified owner document.

Declaration

Source position: laz2_dom.pas line 757

public function TDOMEntity.CloneNode(

  deep: Boolean;

  aCloneOwner: TDOMDocument

):TDOMNode; override;

Arguments

deep

  

True if child nodes are recursively copied in the method.

aCloneOwner

  

Document which owns the clones Entity node.

Function result

DOM node created in the method.

Description

CloneNode is an overridden TDOMNode function in TDOMEntity used to make a copy of the node with ACloneOwner as the owner document for the new node. It re-implements the method from the ancestor class.

CloneNode allocates a new TDOMEntity instance in the node pool for ACloneOwner, and creates the DOM Entity node in the return value. Values from the PublicID, SystemID, and NotationName properties are copied to the new node. The internal name for the Entity (set when the owner document was de-serialized) is also copied to the new node. When deep is True, the CloneChildren method is called to copy the ChildNodes (when assigned) to the new node.

CloneNode calls SetReadOnly to ensure that the new node cannot be modified. The cloned node does not have a parent node.

See also

TDOMEntity.PublicID

  

Public Identifier for the Entity.

TDOMEntity.SystemID

  

System Identifier for the Entity.

TDOMEntity.NotationName

  

Notation name for the Entity.

TDOMNode.SetReadOnly

  

Updates the read-only Node flag for the DOM Node and its children.

TDOMNode_WithChildren.CloneChildren

  

Makes a copy of child nodes in the specified DOM node.

TDOMNode.ChildNodes

  

Provides access to the list of Child nodes for the current node.

TDOMDocument.Alloc

  

Ensures the DOM node class type is allocated using the Node pool for the document.


Version 3.2 Generated 2024-02-25 Home