html5ever
html5ever copied to clipboard
Add XML fragment parsing to xml5ever
Since I deleted the xml5ever repostiory, I've decided to move this issue here. This was a feature @nox asked, and it seems that it's a pain point in servo as well see servo/servo#11995.
The algorithm for parsing xml fragment is in HTML5 spec.
Basically, what's needed is to construct a context
element with given name, a NamespaceMap
, and input string.
It's advised to use parse_fragment
from h5e as reference point.