AngleSharp by Florian Rappl

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

.NET API 886,784 bytes

 IDocument

The Document interface serves as an entry point to the web page's content.

Gets the currently focused element, that is, the element that will get keystroke events if the user types any.

Gets a list of all elements in the document.

Gets a list of all of the anchors in the document.

IHtmlElement Body { get; set; }

Gets the body element.

string CharacterSet { get; }

Gets the character encoding of the current document.

Gets a list of the commands (menu item, button, and link elements) within the current document.

string CompatMode { get; }

Gets a value to indicate whether the document is rendered in Quirks mode (BackComp) or Strict mode (CSS1Compat).

string ContentType { get; }

Gets the Content-Type from the MIME Header of the current document.

string Cookie { get; set; }

Gets or sets the document cookie.

Gets the window object associated with the document or null if none available.

string Direction { get; set; }

Gets or sets the value of the dir attribute.

Gets the document type.

Gets the root element of the document.

string DocumentUri { get; }

Gets the URI of the current document.

string Domain { get; set; }

Gets or sets the domain portion of the origin of the current document.

Gets the forms in the document.

Gets or sets the head element.

Gets the images in the document.

Gets the DOM implementation associated with the current document.

string LastModified { get; }

Gets the date of the last modification.

Gets a collection of all area and anchor elements in a document with a value for the href attribute.

Gets the current location of the document.

string Origin { get; }

Gets the Unicode serialization of document's origin.

Gets a list of the embed elements within the current document.

Gets the current ready state of the document.

string Referrer { get; }

Gets the referer to that pointed to the current document.

Gets the scripts in the document.

string Title { get; set; }

Gets or sets the title of the document.

string Url { get; }

Gets a string containing the URL of the current document.

Event triggered after the ready state changed.

INode Adopt(INode externalNode)

Adopts a node from an external document. The node and its subtree is removed from the document it's in (if any), and its ownerDocument is changed to the current document. The node can then be inserted into the current document. The new node's parentNode is null, since it has not yet been inserted into the document tree.

void CloseCurrent()

Finishes writing to a document.

IComment CreateComment(string data)

Creates a new comment node, and returns it.

Creates an empty DocumentFragment object.

IElement CreateElement(string name)

Creates a new element with the given tag name.

IElement CreateElement(string namespaceUri, string name)

Creates a new element with the given tag name and namespace URI.

IEvent CreateEvent(string type)

Creates an event of the type specified.

INodeIterator CreateNodeIterator(INode root, FilterSettings settings = 4294967295, NodeFilter filter = null)

Creates a new NodeIterator object.

Creates a ProcessingInstruction node given the specified name and data strings.

Creates a new Range object.

IText CreateTextNode(string data)

Creates a new text node and returns it.

ITreeWalker CreateTreeWalker(INode root, FilterSettings settings = 4294967295, NodeFilter filter = null)

Creates a new TreeWalker object.

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

Returns a list of elements with a given name in the HTML document.

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

IHtmlCollection 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.

INode Import(INode externalNode, bool deep = true)

Creates a copy of a node from an external document that can be inserted into the current document.

bool LoadHtml(string url)

Loads the document content from the given URL and replaces the current content.

IDocument OpenNew(string type = "text/html", string replace = null)

Opens a document stream for writing.

void Write(string content)

Writes text to a document.

void WriteLine(string content)

Writes a line of text to a document.