AncestorsAndSelf 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> AncestorsAndSelf()
Visual Basic
Public Function AncestorsAndSelf As IEnumerable(Of HtmlNode)
Visual C++
public:
IEnumerable<HtmlNode^>^ AncestorsAndSelf()

Return Value

See Also