AngleSharp by Florian Rappl

<PackageReference Include="AngleSharp" Version="0.8.6" />

 SelectorExtensions

public static class SelectorExtensions
Defines a set of extension methods involving selectors.
public static IEnumerable<IElement> Children(this IEnumerable<IElement> elements, string selectorText = "*")

Gets the children of the provided elements. Optionally uses a CSS selector to filter the results.

public static IEnumerable<IElement> Is(this IEnumerable<IElement> elements, string selectorText)

Keeps elements that are matched by the provided selector.

public static IEnumerable<IElement> Next(this IEnumerable<IElement> elements, string selectorText = "*")

Gets the following siblings of the provided elements. Optionally uses a CSS selector to filter the results.

public static IEnumerable<IElement> Not(this IEnumerable<IElement> elements, string selectorText)

Keeps elements that are not matched by the provided selector.

public static IEnumerable<IElement> Parent(this IEnumerable<IElement> elements, string selectorText = "*")

Gets the parents of the provided elements. Optionally uses a CSS selector to filter the results.

public static IEnumerable<IElement> Previous(this IEnumerable<IElement> elements, string selectorText = "*")

Gets the preceding siblings of the provided elements. Optionally uses a CSS selector to filter the results.

public static IEnumerable<IElement> Siblings(this IEnumerable<IElement> elements, string selectorText = "*")

Gets the siblings of the provided elements. Optionally uses a CSS selector to filter the results.