mischov/meeseeks_html5ever

Provide an XML parser

mischov opened this issue · 0 comments

There are people out there trying to use Meeseeks or Floki with XML files, and that can lead to some confusing results (particularly in the case of meeseeks_html5ever and html5ever_elixir, which are HTML5 spec compliant).

Rather than have people reach for the wrong tool because it's the one readily at hand, I'd prefer to provide an XML parser.

Solution

Happily the html5ever project also has a permissive XML parser, xml5ever, and there has recently been work to unify the two so that they can use the same TreeSink (in my case the FlatDom that I convert to a Meeseeks.Document).

Consequently, all that should be required to support an XML parser is to provide functions which allow the use of xml5ever to parse instead of html5ever.