pub fn scrape_elements(spec: String) -> Result<Vec<ScrapedElement>>
Expand description
Parse the WhatWG HTML standards document.
ยงDesign
The entire HTML spec is a flat document with little hierarchy. we first need to find
the metadata section labeled by .element
. Then we need to track back through the
siblings to find the first h4
node. That will contain the title of the elements.
Once we have the title, we can inspect the .element
node properly. This is a nested
table containing strings. We then parse these strings into a structured representation.