IronWebScraper - The C# Web Scraping Library
HtmlNode Class |
The HtmlNode class represents a single DOM element in a HTML or XML document.

Namespace: IronWebScraper
Assembly: IronWebScraper (in IronWebScraper.dll) Version: 4.0.4.25470 (4.0.4.3)

The HtmlNode type exposes the following members.

Name | Description | |
---|---|---|
![]() | Attributes |
Gets the attributes of the HTML node (such ash href, class, style etc).
|
![]() | ChildNodes |
An array of nodes nested within the HtmlNode.
|
![]() | InnerHtml |
Gets the HtmlNode's inner Html as a string. OuterHTML will not include the current tag's own html markup, only that nested inside it.
|
![]() | InnerText |
Gets the text content of the HtmlNode as might be shown to a user.
Text will be trimmed, with all groups of whitespace turned into a single space character.
|
![]() | InnerTextClean |
Gets the text content of the HtmlNode as might be shown to a user.
|
![]() | NodeName |
Name of the HtmlNode such as "div" "p" or "#text"
|
![]() | NodeType | Type of the HtmlNode Possible values are: "ELEMENT_NODE", "TEXT_NODE" ,"CDATA_SECTION_NODE" ,"COMMENT_NODE", "DOCUMENT_NODE","DOCUMENT_TYPE_NODE","DOCUMENT_FRAGMENT_NODE" |
![]() | OuterHtml |
Gets the HtmlNode's outer Html as a string. OuterHTML will include the tag's own html markup.
|
![]() | ParentNode |
Gets the Parent (enclosing) tag for this HtmlNode.
|
![]() | TextContent |
Gets the text content of the HtmlNode and all of its descendants.
|
![]() | TextContentClean |
Gets the text content of the HtmlNode, Trimmed, with all groups of whitespace turned into a single space character.
TextContent will include the content of non-printable elements just as style and script nodes.
|

Name | Description | |
---|---|---|
![]() | Css |
Uses CSS selectors to find all child nodes matching selector.
This works in the same way as $('.ClassName') in jQuery or querySelectorAll() in JavaScript.
|
![]() | CssExists |
Uses CSS selectors to find if there are any matching nodes within the Response Document.
This works in the same way as $('.ClassName').length > 0 in jQuery or querySelectorAll().length >0 in JavaScript.
|
![]() | Equals | (Inherited from Object.) |
![]() | GetAttribute | Gets a single attribute vale from the HtmlNode. Returns null if that attribute is not present. |
![]() | GetElementById |
Synonym of JavaScript's getElementById function. Searches inside the current HtmlNode.
|
![]() | GetElementsByTagName |
Synonym of JavaScript's getElementsByTagName function. Searches inside the current HtmlNode.
|
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | HasAtribute |
Tests if the HtmlNode has a given attribute such as "class" or "href"
|
![]() | QuerySelector |
Synonym of JavaScript's querySelector function. Searches inside the current HtmlNode.
|
![]() | QuerySelectorAll |
Synonym of JavaScript's querySelectorAll function. Searches inside the current HtmlNode.
|
![]() | ToString | (Inherited from Object.) |
![]() | XPath |
Queries the HtmlNode to return all descendant nodes matching an XPath expression.
|
