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 a poor man's HTML output, but I don't understand how I can modify the RcDom object I retrieved. I would like to see a snippet inserting an anchor element ( <a name="foo"></a> ) to an RcDom . Note: this is a question regarding Rust and html5ever