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

TDOMDocument.ReplaceChild

Replaces a child node with another DOM node.

Declaration

Source position: laz2_dom.pas line 502

public function TDOMDocument.ReplaceChild(

  NewChild: TDOMNode;

  OldChild: TDOMNode

):TDOMNode; override;

Arguments

NewChild

  

New DOM node to include in the document.

OldChild

  

DOM Node replaced with the new DOM node.

Function result

TDOMNode instance detached from the document.

Description

ReplaceChild is an overridden TDOMNode function used to replace the DOM node in OldChild with the DOM node in NewChild.

ReplaceChild ensures that the DocumentElement can be replaced with the specified element node or DTD node in NewChild. When NewNode is not an element or DTD node, the inherited ReplaceChild method is called.

The return value is the TDOMNode instance in OldChild after it has been detached from the document.

See also

TDOMDocument.DocumentElement

  

Gets the root element for the document.

TDOMDocument.DocType

  

Document Type declaration used in the document.

TDOMNode.NodeType

  

Node type for the DOM Node.

TDOMNode_WithChildren.ReplaceChild

  

Replaces a child DOM node with another DOM node.


Version 3.2 Generated 2024-02-25 Home