HtmlDocument

An HTML document.

Constructors

this
this(DomParserSettings parserSettings)

Creates a new html document.

Members

Functions

getElementById
HtmlNode getElementById(string id)

Gets a dom node by an attribute named "id" matching the given value.

parseElements
void parseElements(DomNode[] elements)

Parses the elements from the dom to the document.

querySelector
HtmlNode querySelector(string selector)

Queries the first dom node based on a css3 selector.

querySelectorAll
HtmlNode[] querySelectorAll(string selector)

Queries all dom nodes based on a css3 selector.

repairDocument
void repairDocument()

Repairs the html document if possible.

toString
string toString()

Converts the html document to a properly formatted html document-string.

Properties

head
HtmlNode head [@property getter]

Gets the head node.

root
HtmlNode[] root [@property setter]

Sets the root nodes of the html document.

rootNodes
HtmlNode[] rootNodes [@property getter]

Gets the root nodes of the html document.

Inherited Members

From DomDocument

parseElements
void parseElements(DomNode[] elements)

Parses the elements from the dom to the document.

repairDocument
void repairDocument()

Repairs the document if possible.

parserSettings
DomParserSettings parserSettings [@property getter]

Gets the settings used for parsing the document.

Meta