INode
A Node is an interface from which a number of DOM types inherit, and
allows these various types to be treated similarly.
using AngleSharp.Attributes;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace AngleSharp.Dom
{
[System.Runtime.CompilerServices.NullableContext(1)]
[DomName("Node")]
public interface INode : IEventTarget, IMarkupFormattable
{
[DomName("baseURI")]
string BaseUri { get; }
[System.Runtime.CompilerServices.Nullable(2)]
Url BaseUrl {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[DomName("nodeName")]
string NodeName { get; }
[DomName("childNodes")]
INodeList ChildNodes { get; }
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("ownerDocument")]
IDocument Owner {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("parentElement")]
IElement ParentElement {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("parentNode")]
INode Parent {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("firstChild")]
INode FirstChild {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("lastChild")]
INode LastChild {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("nextSibling")]
INode NextSibling {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[System.Runtime.CompilerServices.Nullable(2)]
[DomName("previousSibling")]
INode PreviousSibling {
[System.Runtime.CompilerServices.NullableContext(2)]
get;
}
[DomName("nodeType")]
NodeType NodeType { get; }
[DomName("nodeValue")]
string NodeValue { get; set; }
[DomName("textContent")]
string TextContent { get; set; }
[DomName("hasChildNodes")]
[DomAccessor(Accessors.Method)]
[System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, new string[] {
"ChildNodes",
"FirstChild",
"LastChild"
})]
bool HasChildNodes {
[System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, new string[] {
"ChildNodes",
"FirstChild",
"LastChild"
})]
get;
}
NodeFlags Flags { get; }
[DomName("cloneNode")]
INode Clone(bool deep = true);
[DomName("isEqualNode")]
bool Equals(INode otherNode);
[DomName("compareDocumentPosition")]
DocumentPositions CompareDocumentPosition(INode otherNode);
[DomName("normalize")]
void Normalize();
[DomName("contains")]
bool Contains(INode otherNode);
[DomName("isDefaultNamespace")]
bool IsDefaultNamespace(string namespaceUri);
[DomName("lookupNamespaceURI")]
[return: System.Runtime.CompilerServices.Nullable(2)]
string LookupNamespaceUri(string prefix);
[System.Runtime.CompilerServices.NullableContext(2)]
[DomName("lookupPrefix")]
string LookupPrefix(string namespaceUri);
[DomName("appendChild")]
INode AppendChild(INode child);
[DomName("insertBefore")]
INode InsertBefore(INode newElement, [System.Runtime.CompilerServices.Nullable(2)] INode referenceElement);
[DomName("removeChild")]
INode RemoveChild(INode child);
[DomName("replaceChild")]
INode ReplaceChild(INode newChild, INode oldChild);
}
}