AngleSharp by AngleSharp

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

.NET API 1,204,224 bytes

 CollectionExtensions

static class CollectionExtensions
A bunch of methods for getting DOM elements.
public static bool Accepts(this FilterSettings filter, INode node)

Determines if the current filter settings includes the provided node.

public static IEnumerable<T> Concat<T>(this IEnumerable<T> items, T element)

Returns the concatenation of the provided enumerable with the specified element.

public static IElement GetElementById(this INodeList children, string id)

Gets an element by its ID.

public static T GetElementById<T>(this IEnumerable<T> elements, string id) where T : IElement

Gets the element with the provided id, if any. Otherwise the element with the same name is searched.

public static IEnumerable<T> GetElements<T>(this INode parent, bool deep = true, Predicate<T> predicate = null) where T : INode

Gets the descendents from the provided parent that fulfill the specified predicate, if any.

public static IEnumerable<T> GetElements<T>(this INode parent, FilterSettings filter) where T : INode

Gets the elements that satisfy the provided filter settings.

public static void GetElementsByName(this INodeList children, string name, List<IElement> result)

Gets a list of HTML elements given by their name attribute.

public static T GetItemByIndex<T>(this IEnumerable<T> items, int index)

Gets an item from the enumerable by its index. Throws an exception if the provided index is invalid.