AngleSharp by Florian Rappl

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

.NET API 1,174,016 bytes

 Document

Represents a document node.
public IElement ActiveElement { get; protected set; }

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

public IHtmlAllCollection All { get; }

Gets a list of all elements in the document.

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

public IHtmlElement Body { get; set; }

Gets the body element.

public string CharacterSet { get; }

Gets the character encoding of the current document.

public int ChildElementCount { get; }

Gets the number of child elements.

Gets the child elements.

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

public string CompatMode { get; }

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

public string ContentType { get; protected set; }

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

public IBrowsingContext Context { get; }

Gets the browsing context to use.

public string Cookie { get; set; }

Gets or sets the document cookie.

Gets the script which is currently being processed.

public IWindow DefaultView { get; }

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

public string DesignMode { get; set; }

Gets or sets if the whole document is editable.

public string Direction { get; set; }

Gets or sets the value of the dir attribute.

public IDocumentType Doctype { get; }

Gets the document type.

public abstract IElement DocumentElement { get; }

Gets the root element of the document.

public string DocumentUri { get; protected set; }

Gets the URI of the current document.

public Url DocumentUrl { get; }

Gets the url of the current document.

public string Domain { get; set; }

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

public IElement FirstElementChild { get; }

Gets the first child element of this element.

Gets the forms in the document.

public IHtmlHeadElement Head { get; }

Gets or sets the head element.

Gets the images in the document.

Gets the DOMImplementation object that handles this document.

public bool IsAsync { get; }

Gets an indicator if loading the document should be asynchronous or synchronous.

public IElement LastElementChild { get; }

Gets the last child element of this element.

public string LastModified { get; }

Gets a string containing the date and time on which the current document was last modified.

public string LastStyleSheetSet { get; }

Gets the last enabled style sheet set; this property's value changes whenever the SelectedStyleSheetSet property is changed.

public IHtmlCollection<IElement> Links { get; }

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

public ILocation Location { get; }

Gets or sets the URI of the current document.

public string Origin { get; }

Gets the origin of the document.

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

public string PreferredStyleSheetSet { get; }

Gets the preferred style sheet set as set by the page author.

public DocumentReadyState ReadyState { get; protected set; }

Gets or sets the ready state of the document.

public string Referrer { get; protected set; }

Gets the URI of the page that linked to this page.

public IEnumerable<Task> Requests { get; }

Gets the currently outstanding requests.

Gets the scripts in the document.

public string SelectedStyleSheetSet { get; set; }

Gets or sets the selected stylesheet set.

public IStyleSheetList StyleSheets { get; }

Gets a list of stylesheet objects for stylesheets explicitly linked into or embedded in a document.

public IStringList StyleSheetSets { get; }

Gets a live list of all of the currently-available style sheet sets.

public abstract string Title { get; set; }

Gets or sets the title of the document.

public string Url { get; }

Gets a string containing the URL of the current document.

public event DomEventHandler Aborted

public event DomEventHandler Blurred

public event DomEventHandler CanPlay

public event DomEventHandler Changed

public event DomEventHandler Clicked

public event DomEventHandler Drag

public event DomEventHandler DragEnd

public event DomEventHandler Dropped

public event DomEventHandler Emptied

public event DomEventHandler Ended

public event DomEventHandler Error

public event DomEventHandler Focused

public event DomEventHandler Input

public event DomEventHandler Invalid

public event DomEventHandler KeyDown

public event DomEventHandler KeyUp

public event DomEventHandler Loaded

public event DomEventHandler Loading

public event DomEventHandler MouseUp

public event DomEventHandler Paused

public event DomEventHandler Played

public event DomEventHandler Playing

public event DomEventHandler Resized

public event DomEventHandler Seeked

public event DomEventHandler Seeking

public event DomEventHandler Shown

public event DomEventHandler Stalled

public event DomEventHandler Toggled

public event DomEventHandler Waiting

protected static void CopyDocumentProperties(Document source, Document target, bool deep)

Copies all (Document) properties of the source to the target.

public INode Adopt(INode externalNode)

Removes the node from its original document and places it in this document.

public void Append(INode[] nodes)

Appends nodes to current document.

public abstract INode Clone(bool deep = true)

Returns a duplicate of the node on which this method was called.

public IComment CreateComment(string data)

Creates a new comment node, and returns it.

Creates an empty DocumentFragment object.

public IElement CreateElement(string localName)

Creates a new element with the given tag name.

public IElement CreateElement(string namespaceUri, string qualifiedName)

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

public Event CreateEvent(string type)

Creates an event of the type specified.

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

Creates a new NodeIterator object.

public IProcessingInstruction CreateProcessingInstruction(string target, string data)

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

Returns a new Range object.

public IText CreateTextNode(string data)

Creates a new Text node.

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

Creates a new TreeWalker object.

public void Dispose()

Destroys the current document.

public void EnableStyleSheetsForSet(string name)

Enables the stylesheets matching the specified name in the current stylesheet set, and disables all other stylesheets (except those without a title, which are always enabled).

public IElement GetElementById(string elementId)

Returns the Element whose ID is given by elementId. If no such element exists, returns null. The behavior is not defined if more than one element have this ID.

public IHtmlCollection<IElement> GetElementsByClassName(string classNames)

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.

public IHtmlCollection<IElement> GetElementsByTagName(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 bool HasFocus()

Checks if the document has focus.

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

public void Load(string url)

Loads the document content from the given url.

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

Opens a document stream for writing. For information see: http://www.whatwg.org/specs/web-apps/current-work/#dom-document-open

public void Prepend(INode[] nodes)

Prepends nodes to the current document.

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.

public void Write(string content)

Writes text to a document.

public void WriteLine(string content)

Writes a line of text to a document.