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.0
Syntax 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:
Booleantrue if the
oldNode was successfully replaced with the
newNode.
Exceptions Exception | Condition |
---|
ArgumentException |
The newNode or the oldNode is null.
|
ObjectDisposedException | The INode has already been disposed. |
Remarks The old node could be used for inserting/appending it into the document later.
See Also