AngleSharp by Florian Rappl

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

.NET API 1,171,968 bytes

 Node

Represents a node in the generated tree.
public string BaseUri { get; }

Gets the absolute base URI of a node or null if unable to obtain an absolute URI.

public Url BaseUrl { get; set; }

Gets or sets the base url of the node.

public bool HasChildNodes { get; }

Gets a boolean value indicating whether the current Node has child nodes or not.

public string NodeName { get; }

Gets the tag name for this node.

public NodeType NodeType { get; }

Gets the type of this node.

public virtual string NodeValue { get; set; }

Gets or sets the value of the current node.

public TextRange OriginalPosition { get; }

Gets the positions of the node in the original source code.

public IElement ParentElement { get; }

Gets or sets the parent element of this node.

public virtual string TextContent { get; set; }

Gets or sets the text content of a node and its descendants.

protected static void CopyProperties(Node source, Node target, bool deep)

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

public INode AppendChild(INode child)

Adds a child to the collection of children.

public virtual INode Clone(bool deep = true)

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

Compares the position of the current node against another node in any other document.

public bool Contains(INode otherNode)

Indicates whether a node is a descendent of this node.

public virtual bool Equals(INode otherNode)

Tests whether two nodes are equal.

public INode InsertBefore(INode newElement, INode referenceElement)

Inserts the specified node before a reference element as a child of the current node.

public INode InsertChild(int index, INode child)

Inserts a child to the collection of children at the specified index.

public bool IsDefaultNamespace(string namespaceUri)

Accepts a namespace URI as an argument and returns true if the namespace is the default namespace on the given node or false if not.

protected virtual string LocateNamespace(string prefix)

Tries to locate the namespace of the given prefix.

protected virtual string LocatePrefix(string namespaceUri)

Tries to locate the prefix with the namespace.

public string LookupNamespaceUri(string prefix)

Takes a prefix and returns the namespaceURI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace.

public string LookupPrefix(string namespaceUri)

Returns the prefix for a given namespaceURI if present, and null if not. When multiple prefixes are possible, the result is implementation-dependent.

public void Normalize()

Puts the specified node and all of its subtree into a "normalized" form. In a normalized subtree, no text nodes in the subtree are empty and there are no adjacent text nodes.

public INode RemoveChild(INode child)

Removes a child from the collection of children.

public INode ReplaceChild(INode newChild, INode oldChild)

Replaces one child node of the specified element with another.

public virtual string ToHtml()

Returns an HTML-code representation of the node.