NodeReplaceChild Method

Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.

Namespace: Aspose.Html.Dom
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 22.1
Syntax
public Node ReplaceChild(
	Node node,
	Node child
)

Parameters

node
Type: Aspose.Html.DomNode

The new node to replace oldChild.

child
Type: Aspose.Html.DomNode

The child to be replaced.

Return Value

Type: Node

The replaced Node. This is the same node as oldChild.

See Also