Expand description
§Parse HTML Fragments
This module provides tools for parsing HTML fragments. An HTML fragment is a (possibly empty) list of HTML text or element nodes. For example:
<p>This is an HTML fragment</p>- Parsing on the browser is done using 
Element::innerHtml. On the server it usesscraper. - If any errors are present, a best effort is made to parse the HTML.
 - Any empty text nodes are removed.
 - Attributes are sorted to make the result more testable.
 
Functions§
- html_
to_ nodes  - Convert an HTML fragment to Silkenweb nodes.
 - html_
to_ tokens  - Convert an HTML fragment to Silkenweb node expressions.