Click or drag to resize

INodeCollectionReplace Method

Replaces an existing child node with a new node. The new node could be an existing node in the document, or you can create a new node. If the newNode is an existing node, it will be moved to new location in the document.

Namespace:  DotNetBrowser.Dom
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.23.2
Syntax
C#
bool Replace(
	INode newNode,
	INode oldNode
)

Parameters

newNode
Type: DotNetBrowser.DomINode
the new node for replacement.
oldNode
Type: DotNetBrowser.DomINode
the existing node, which will be replaced by newNode.

Return Value

Type: Boolean
true if the oldNode was successfully replaced with the newNode.
Exceptions
ExceptionCondition
ArgumentException The newNode or the oldNode is null.
ObjectDisposedExceptionThe INode has already been disposed.
Remarks
The old node could be used for inserting/appending it into the document later.
See Also