html5ever is the html parser used in servo, the new browser engine developed at Mozilla. It is implemented in Rust.
Questions tagged [html5ever]
6 questions
15
votes
3 answers
Parsing HTML page content in a stream with hyper and html5ever
I'm trying to parse the HTML response of an HTTP request. I'm using hyper for the requests and html5ever for the parsing. The HTML will be pretty large and I don't need to fully parse it -- I just need to identify some data from tags so I would…

Explosion Pills
- 188,624
- 52
- 326
- 405
14
votes
1 answer
How do I parse a page with html5ever, modify the DOM, and serialize it?
I would like to parse a web page, insert anchors at certain positions and render the modified DOM out again in order to generate docsets for Dash. Is this possible?
From the examples included in html5ever, I can see how to read an HTML file and do…

kesselborn
- 533
- 5
- 7
3
votes
0 answers
How to get an HTML tag as 2 strings (opening tag, closing tag), without its contents from kuchiki?
I am writing an HTML to Markdown converter in Rust, using Kuchiki to get access to the parsed tree from html5ever.
For unknown HTML tags, I want to provide the possibility to ignore them and pass them through to the output string, but still…
user1115652
2
votes
1 answer
How to get all text of a HTML document (except script/style/noscript tags) using Kuchiki?
I'm trying to get all the text on a HTML page, except for non-visible text (example: I don't want text inside script/style/noscript tags).
Here's what I've come up with so far:
let parser = kuchiki::parse_html().one(content);
for child in…

Foobar
- 7,458
- 16
- 81
- 161
2
votes
2 answers
How do I convert a Tendril to &str or String?
I'm using HTML5ever, and I'm trying to put attributes into a Vec<(String, String>) (although (&str, &str) would work too).
Unfortunately, html5ever's attribute values are in Tendrils, not Strings (or QualNames, &strs, etc.). How can I convert…

thatlittlegit
- 69
- 1
- 8
0
votes
1 answer
How do I parse a page with html5ever and find all the links?
I would like to parse HTML in the string format with html5ever and find all the links in this HTML. I'm aware of How do I parse a page with html5ever, modify the DOM, and serialize it?, however RcDom does not exist anymore.

Søren Gade
- 43
- 5