Minimal HTML DOM + CSS query subset for scraping. Selectors: tag, #id,.class, tag.class, descendant (a b), child (a > b). Flat node pool (json.Doc style) — no recursive owning trees.
struct Attr
pub struct Attr {
pub key string
pub value string
}
Purpose
Minimal HTML DOM + CSS query subset for scraping. Selectors: tag, #id,.class, tag.class, descendant (a b), child (a > b). Flat node pool (json.Doc style) — no recursive owning trees.
Parameters
key string- key
value string- field (string)
(&Doc) text_content
pub fn (d &Doc) text_content(n int) string
Purpose
Method on `&Doc`: text content.
Parameters
d &Doc- receiver &Doc (borrow)
n int- count, length, or limit (int)
Returns
string — result string