| 1 |
Represents the [](https://en.wikipedia.org/wiki/Document_Object_ModelDOM](https://en.wikipedia.org/wiki/Document_Object_Model](https://en.wikipedia.org/wiki/Document_Object_Model) in memory. Provides functions to parse documents and access individual elements (see [](../HtmlNode/index.md`HtmlNode`](../HtmlNode/index.md](../HtmlNode/index.md)). |
| 2 |
|
| 3 |
## Public Properties |
| 4 |
|
| 5 |
| Property | Description | |
| 6 |
|---------------------|-----------------------------------------------------------------------------------------| |
| 7 |
| `root` | Root node of the document. | |
| 8 |
| `nodes` | List of top-level nodes in the document. | |
| 9 |
| `callback` | Callback function that is called for each element in the DOM when generating outertext. | |
| 10 |
| `lowercase` | If enabled, all tag names are converted to lowercase when parsing documents. | |
| 11 |
| `original_size` | Original document size in bytes. | |
| 12 |
| `size` | Current document size in bytes. | |
| 13 |
| `_charset` | Charset of the original document. | |
| 14 |
| `_target_charset` | Target charset for the current document. | |
| 15 |
| `default_br_text` | Text to return for `<br>` elements. | |
| 16 |
| `default_span_text` | Text to return for `<span>` elements. | |
| 17 |
|
| 18 |
## Protected Properties |
| 19 |
|
| 20 |
| Property | Description | |
| 21 |
|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 22 |
| `pos` | Current parsing position within `doc`. | |
| 23 |
| `doc` | The original document. | |
| 24 |
| `char` | Character at position `pos` in `doc`. | |
| 25 |
| `cursor` | Current element cursor in the document. | |
| 26 |
| `parent` | Parent element node. | |
| 27 |
| `noise` | Noise from the original document (i.e. scripts, comments, etc...). | |
| 28 |
| `token_blank` | Tokens that are considered whitespace in HTML. | |
| 29 |
| `block_tags` | A list of tag names where remaining unclosed tags are forcibly closed. | |
| 30 |
| `optional_closing_tags` | A list of tag names where the closing tag can be omitted. | |