AngleSharp by AngleSharp

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

.NET API 960,512 bytes

 ParentNodeExtensions

public static class ParentNodeExtensions
Useful methods for parent node objects.
public static IEnumerable<TNode> Ancestors<TNode>(this INode child)

Gets the ancestor nodes of the given child.

public static IEnumerable<INode> Ancestors(this INode child)

Gets the ancestor nodes of the given child.

public static TElement AppendElement<TElement>(this INode parent, TElement element) where TElement : IElement

Inserts a node as the last child node of this element.

public static void AppendNodes(this INode parent, INode[] nodes)

Appends nodes to parent node.

public static IEnumerable<TNode> Descendants<TNode>(this INode parent)

Gets the descendant nodes of the given parent.

public static IEnumerable<INode> Descendants(this INode parent)

Gets the descendant nodes of the given parent.

public static IEnumerable<TNode> DescendantsAndSelf<TNode>(this INode parent)

Gets the descendant nodes including itself of the given parent.

public static IEnumerable<INode> DescendantsAndSelf(this INode parent)

Gets the descendant nodes including itself of the given parent.

public static IEnumerable<TNode> Descendents<TNode>(this INode parent)

Gets the descendant nodes of the given parent.

public static IEnumerable<INode> Descendents(this INode parent)

Gets the descendant nodes of the given parent.

public static IEnumerable<TNode> DescendentsAndSelf<TNode>(this INode parent)

Gets the descendant nodes including itself of the given parent.

public static IEnumerable<INode> DescendentsAndSelf(this INode parent)

Gets the descendant nodes including itself of the given parent.

public static void InsertAfter(this INode child, INode[] nodes)

Inserts nodes after the given child.

public static void InsertBefore(this INode child, INode[] nodes)

Inserts nodes before the given child.

public static TElement InsertElement<TElement>(this INode parent, TElement newElement, INode referenceElement) where TElement : IElement

Inserts the newElement immediately before the referenceElement.

public static void PrependNodes(this INode parent, INode[] nodes)

Prepends nodes to the parent node.

public static TElement QuerySelector<TElement>(this IParentNode parent, string selectors) where TElement : IElement

Returns the first element matching the selectors with the provided type, or null.

public static IEnumerable<TElement> QuerySelectorAll<TElement>(this IParentNode parent, string selectors) where TElement : IElement

Returns a list of elements matching the selectors with the provided type.

public static TElement RemoveElement<TElement>(this INode parent, TElement element) where TElement : IElement

Removes a child node from the current element, which must be a child of the current node.

public static void RemoveFromParent(this INode child)

Removes the child from its parent.

public static void ReplaceWith(this INode child, INode[] nodes)

Replaces the given child with the nodes.