AngleSharp by Florian Rappl

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

 Element

Represents an element node.
public enum ContentEditableMode

An enumeration with all contenteditable modes.

public enum DirectionMode

An enumeration with all dir modes.

public int ChildElementCount { get; }

Gets the number of child elements.

public HTMLCollection Children { get; }

Gets the child elements.

public DOMTokenList ClassList { get; }

Gets the list of class names.

public string ClassName { get; set; }

Gets or sets the value of the class attribute.

public int ClientHeight { get; }

Gets the inner height of this element.

public int ClientLeft { get; }

Gets the width of the left border of this element.

public int ClientTop { get; }

Gets the height of the top border of this element.

public int ClientWidth { get; }

Gets the inner width of this element.

public ContentEditableMode ContentEditable { get; set; }

Gets or sets whether or not the element is editable. This enumerated attribute can have the values true, false and inherited.

public DOMStringMap Dataset { get; }

Gets access to all the custom data attributes (data-*) set on the element. It is a map of DOMString, one entry for each custom data attribute.

public DirectionMode Dir { get; set; }

Gets or sets the value of the dir attribute.

public Element FirstElementChild { get; }

Gets the first child element of this element.

public string Id { get; set; }

Gets or sets the value of the id attribute.

public string InnerHTML { get; set; }

Gets or sets the HTML syntax describing the element's descendants.

public bool IsContentEditable { get; }

Gets if the element is currently contenteditable.

public bool IsFocused { get; }

Gets if the element has currently focus.

public bool IsHovered { get; }

Gets if the element is being hovered.

public string Lang { get; set; }

Gets or sets the value of the lang attribute.

public Element LastElementChild { get; }

Gets the last child element of this element.

public Element NextElementSibling { get; }

Gets the element immediately following in this node's parent's list of nodes, or null if the current element is the last element in that list.

public int OffsetHeight { get; }

Gets the height of this element, relative to the layout.

public int OffsetLeft { get; }

Gets the distance from this element's left border to its offsetParent's left border.

public Element OffsetParent { get; }

Gets the element from which all offset calculations are currently computed.

public int OffsetTop { get; }

Gets the distance from this element's top border to its offsetParent's top border.

public int OffsetWidth { get; }

Gets the width of this element, relative to the layout.

public string OuterHTML { get; set; }

Gets or sets the HTML syntax describing the element including its descendants.

Gets the element immediately preceding in this node's parent's list of nodes, null if the current element is the first element in that list.

public int ScrollHeight { get; }

Gets the scroll view height of an element.

public int ScrollLeft { get; set; }

Gets or sets the left scroll offset of an element.

public int ScrollTop { get; set; }

Gets or sets the top scroll offset of an element.

public int ScrollWidth { get; }

Gets the scroll view width of an element.

public bool Spellcheck { get; set; }

Gets or sets if spell-checking is activated.

public CSSStyleDeclaration Style { get; }

Gets an object representing the declarations of an element's style attributes.

public int TabIndex { get; set; }

Gets or sets the position of the element in the tabbing order.

public string TagName { get; }

Gets the tagname of the element.

public string Title { get; set; }

Gets or sets the value of the title attribute.

protected static bool ToBoolean(string value, bool defaultValue = false)

Converts the given value to a boolean (or not).

protected static T ToEnum<T>(string value, T defaultValue) where T : struct

Converts the given value to an enumeration value (or not).

protected static int ToInteger(string value, int defaultValue = 0)

Converts the given value to an integer (or not).

protected static uint ToInteger(string value, uint defaultValue = 0)

Converts the given value to an unsigned integer (or not).

public Element After(Node[] nodes)

Inserts nodes after the current node.

public Element Append(Node[] nodes)

Appends nodes to current node.

public Element Before(Node[] nodes)

Inserts nodes before the current node.

public virtual string GetAttribute(string attrName)

Returns the value of the named attribute on the specified element.

public virtual Attr GetAttributeNode(string attrName)

Returns the value of the named attribute.

public virtual Attr GetAttributeNodeNS(string namespaceURI, string attrName)

Returns the value of the named attribute.

public virtual string GetAttributeNS(string namespaceURI, string localAttrName)

Returns the value of the named attribute on the specified element.

public HTMLCollection GetElementsByClassName(string classNames)

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

public HTMLCollection GetElementsByTagName(string tagName)

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

public HTMLCollection 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 virtual bool HasAttribute(string attrName)

Returns a boolean value indicating whether the specified element has the specified attribute or not.

public virtual bool HasAttributeNS(string namespaceURI, string attrName)

Returns a boolean value indicating whether the specified element has the specified attribute or not.

Normalizes namespace declaration attributes and prefixes as part of the normlize document method of the document node.

public Element Prepend(Node[] nodes)

Prepends nodes to the current node.

public Element 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 HTMLCollection 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 Element Remove()

Removes the current element from the parent.

public virtual Element RemoveAttribute(string attrName)

Removes an attribute from the specified element.

public virtual Attr RemoveAttributeNode(Attr attr)

Removes an attribute.

public virtual Element RemoveAttributeNS(string namespaceURI, string localAttrName)

Removes an attribute from the specified element.

public Element Replace(Node[] nodes)

Replaces the current node with the nodes.

public virtual Element SetAttribute(string name, string value)

Adds a new attribute or changes the value of an existing attribute on the specified element.

public virtual Attr SetAttributeNode(Attr attr)

Adds a new Attr node.

public virtual Attr SetAttributeNodeNS(string namespaceURI, Attr attr)

Adds a new namespaced Attr node.

public virtual Element SetAttributeNS(string namespaceURI, string name, string value)

Adds a new attribute or changes the value of an existing attribute on the specified element.