PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 1.9.7
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v1.9.7
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
searchpro / simplehtmldom / manual / docs / api / simple_html_dom / simple_html_dom.md

simple_html_dom.md in BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript 1.9.7, at simplehtmldom/manual/docs/api/simple_html_dom/simple_html_dom.md

40 lines 2.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 ---
2 title: simple_html_dom
3 ---
4
5 # simple_html_dom
6
7 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 [](../simple_html_dom_node/simple_html_dom_node.md`simple_html_dom_node`](../simple_html_dom_node/simple_html_dom_node.md](../simple_html_dom_node/simple_html_dom_node.md)).
8
9 # Public Properties
10
11 | Property | Description
12 | -------- | -----------
13 | `root` | Root node of the document.
14 | `nodes` | List of top-level nodes in the document.
15 | `callback` | Callback function that is called for each element in the DOM when generating outertext.
16 | `lowercase` | If enabled, all tag names are converted to lowercase when parsing documents.
17 | `original_size` | Original document size in bytes.
18 | `size` | Current document size in bytes.
19 | `_charset` | Charset of the original document.
20 | `_target_charset` | Target charset for the current document.
21 | `default_span_text` | Text to return for `<span>` elements.
22
23 # Protected Properties
24
25 | Property | Description
26 | -------- | -----------
27 | `pos` | Current parsing position within `doc`.
28 | `doc` | The original document.
29 | `char` | Character at position `pos` in `doc`.
30 | `cursor` | Current element cursor in the document.
31 | `parent` | Parent element node.
32 | `noise` | Noise from the original document (i.e. scripts, comments, etc...).
33 | `token_blank` | Tokens that are considered whitespace in HTML.
34 | `token_equal` | Tokens to identify the equal sign for attributes, stopping either at the closing tag ("/" i.e. `<html />`) or the end of an opening tag (">" i.e. `<html>`).
35 | `token_slash` | Tokens to identify the end of a tag name. A tag name either ends on the ending slash ("/" i.e. `<html/>`) or whitespace (`"\s\r\n\t"`).
36 | `token_attr` | Tokens to identify the end of an attribute.
37 | `default_br_text` | Text to return for `<br>` elements.
38 | `self_closing_tags` | A list of tag names where the closing tag is omitted.
39 | `block_tags` | A list of tag names where remaining unclosed tags are forcibly closed.
40 | `optional_closing_tags` | A list of tag names where the closing tag can be omitted.