Ancestors Method

Html Agility Pack

Collapse imageExpand ImageCopy imageCopyHover image
Returns a collection of all ancestor nodes of this element.

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

Syntax

C#
public IEnumerable<HtmlNode> Ancestors()
Visual Basic
Public Function Ancestors As IEnumerable(Of HtmlNode)
Visual C++
public:
IEnumerable<HtmlNode^>^ Ancestors()

Return Value

See Also