ReplaceChild Method

Html Agility Pack

Collapse imageExpand ImageCopy imageCopyHover image
Replaces the child node oldChild with newChild node.

Namespace: HtmlAgilityPack
Assembly: HtmlAgilityPack (in HtmlAgilityPack.dll) Version: 1.4.0.0 (1.4.0.0)

Syntax

C#
public HtmlNode ReplaceChild(
	HtmlNode newChild,
	HtmlNode oldChild
)
Visual Basic
Public Function ReplaceChild ( _
	newChild As HtmlNode, _
	oldChild As HtmlNode _
) As HtmlNode
Visual C++
public:
HtmlNode^ ReplaceChild(
	HtmlNode^ newChild, 
	HtmlNode^ oldChild
)

Parameters

newChild
Type: HtmlAgilityPack..::..HtmlNode
The new node to put in the child list.
oldChild
Type: HtmlAgilityPack..::..HtmlNode
The node being replaced in the list.

Return Value

The node replaced.

See Also