Interface IParentNode
- Namespace
- AngleSharp.Dom
- Assembly
- AngleSharp.dll
Defines the ParentNode interface that is implemented by possible parents.
[DomName("ParentNode")]
[DomNoInterfaceObject]
public interface IParentNode
- Extension Methods
Properties
ChildElementCount
Gets the number of child elements.
[DomName("childElementCount")]
int ChildElementCount { get; }
Property Value
Children
Gets the child elements.
[DomName("children")]
IHtmlCollection<IElement> Children { get; }
Property Value
FirstElementChild
Gets the first child element of this element.
[DomName("firstElementChild")]
IElement? FirstElementChild { get; }
Property Value
LastElementChild
Gets the last child element of this element.
[DomName("lastElementChild")]
IElement? LastElementChild { get; }
Property Value
Methods
Append(params INode[])
Appends nodes to current document.
[DomName("append")]
void Append(params INode[] nodes)
Parameters
nodes
INode[]The nodes to append.
Prepend(params INode[])
Prepends nodes to the current document.
[DomName("prepend")]
void Prepend(params INode[] nodes)
Parameters
nodes
INode[]The nodes to prepend.
QuerySelector(string)
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.
[DomName("querySelector")]
IElement? QuerySelector(string selectors)
Parameters
selectors
stringThe group of selectors to use.
Returns
- IElement
The found element.
QuerySelectorAll(string)
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.
[DomName("querySelectorAll")]
IHtmlCollection<IElement> QuerySelectorAll(string selectors)
Parameters
selectors
stringThe group of selectors to use.
Returns
- IHtmlCollection<IElement>
A non-live NodeList of element objects.