Registry / other / html5ever

html5ever

JSON →
library0.39.0rscratesunverified

High-performance browser-grade HTML5 parser.

# Cargo.toml [dependencies] html5ever = "0.39.0"
INSTALL
IMPORT
SIG · HTML5EVER
H
html5ever
otherrustv0.39.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_document
use html5ever::parse_document;

Parses an HTML string into a DOM tree.

use html5ever::parse_document; use html5ever::tendril::TendrilSink; let html = "<p>Hello</p>"; let dom = parse_document(rcdom::RcDom::default(), Default::default()) .from_utf8() .read_from(&mut html.as_bytes()) .unwrap(); println!("Parsed: {:?}", dom.document.name);
Debug
Known issues
gotchaRequires the `rcdom` feature for a simple DOM implementation.
fix
Add `features = ["rcdom"]` to the html5ever dependency in Cargo.toml.
affects: >=0.25.0
Upgrade
Version history
0.39.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Meta
1
Resources
html5ever — cargo add html5ever · libregistry