HtmlNodeCollectionClone Method

Return a deep copy of the provided HTML node collection.

Definition

Namespace: Html
Assembly: Html (in Html.dll) Version: 25.2822.3845
C#
public static HtmlNodeCollection Clone(
	HtmlNodeCollection nodes,
	List<string> uniqueIds = null
)

Parameters

nodes  HtmlNodeCollection
Reference to the collection of nodes to copy.
uniqueIds  ListString  (Optional)
Optional reference to a collection of unique IDs to be avoided. If omitted, a list will be created from the root node.

Return Value

HtmlNodeCollection
Reference to the newly cloned collection, if a legitimate source was supplied. Otherwise, null.

See Also