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

TDOMNode.ReplaceChild

Replaces a child node with the specified DOM node.

Declaration

Source position: laz2_dom.pas line 280

public function TDOMNode.ReplaceChild(

  NewChild: TDOMNode;

  OldChild: TDOMNode

):TDOMNode; virtual;

Arguments

NewChild

  

New node to store in child nodes.

OldChild

  

Old node to remove from the child nodes.

Function result

Old child node replaced in the method.

Description

ReplaceChild is a TDOMNode function which specifies the method used to replace a child node in the DOM sub-tree with the specified DOM node. NewChild is the DOM node to store in the DOM sub-tree. OldChild is the existing DOM node replaced with the new node value.

While TDOMNode specifies the method, it does not provide physical storage for child nodes. As a result, ReplaceChild always raises an EDOMHierarchyRequest exception and the return value is always Nil. ReplaceChild must be re-implemented in a descendent class to provide the functionality required for other DOM node specializations.

See also

TDOMNode

  

Implements the DOM Node interface.

TDOMNode_WithChildren

  

Extends TDOMNode to allocate storage for child nodes.

TDOMDocument

  

Implements the DOM Document interface.

EDOMHierarchyRequest

  

Exception raised when an inserted node is not valid for the Document Object Model (DOM).


Version 3.2 Generated 2024-02-25 Home