Method Replace
- Namespace
- DotNetBrowser.Dom
- Assembly
- DotNetBrowser.dll
Replace(INode, INode)
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.
bool Replace(INode newNode, INode oldNode)
Parameters
newNode
INodethe new node for replacement.
oldNode
INodethe existing node, which will be replaced by
newNode
.
Returns
- bool
true
if theoldNode
was successfully replaced with thenewNode
.
Remarks
The old node could be used for inserting/appending it into the document later.
Exceptions
- ArgumentException
The
newNode
or theoldNode
is null.- ObjectDisposedException
The INode has already been disposed.