AngleSharp by AngleSharp

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

.NET API 1,213,440 bytes

 DocumentFragment

Represents a document fragment.
public int ChildElementCount { get; }

Gets the number of child elements.

Gets the child elements.

public IElement FirstElementChild { get; }

Gets the first child element of this element.

public IElement LastElementChild { get; }

Gets the last child element of this element.

public void Append(INode[] nodes)

Appends nodes to current document fragment.

public IElement GetElementById(string elementId)

Tries to get the an element in the DOM tree given its id.

public IHtmlCollection<IElement> GetElementsByClassName(string classNames)

Returns a set of elements which have all the given class names.

Returns a NodeList of elements with the given tag name. The complete document is searched, including the root node.

public IHtmlCollection<IElement> GetElementsByTagNameNS(string namespaceURI, string tagName)

Returns a list of elements with the given tag name belonging to the given namespace. The complete document is searched, including the root node.

public void Prepend(INode[] nodes)

Prepends nodes to the current document fragment.

public IElement QuerySelector(string selectors)

Returns the first element within the document (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors.

public IHtmlCollection<IElement> QuerySelectorAll(string selectors)

Returns a list of the elements within the document (using depth-first pre-order traversal of the document's nodes) that match the specified group of selectors.