HtmlNodeCollectionFindMatchingAttributes Method

Return a list of attributes from the nodes in the caller's collection that match the specified value.

Definition

Namespace: Html
Assembly: Html (in Html.dll) Version: 25.2822.3845
C#
public static List<HtmlAttributeItem> FindMatchingAttributes(
	HtmlNodeCollection nodes,
	Func<HtmlAttributeItem, bool> match,
	bool recurse = true
)

Parameters

nodes  HtmlNodeCollection
Reference to the collection of nodes to be searched.
match  FuncHtmlAttributeItem, Boolean
Reference to the matching predicate.
recurse  Boolean  (Optional)
Optional value indicating whether to recurse in levels. Default = true.

Return Value

ListHtmlAttributeItem
Reference to a list of attributes, if any matches were found. Otherwise, an empty list.

See Also