3 ms·
Oga: a new XML/HTML parser for Ruby (2014)
- bretthopper 11y agoNeeds 2014 in the title. Oga has been around for a while now and seems to be pretty stable.
- gsnedders 11y agoKinda sadly, a brand new HTML parser that doesn't even follow the HTML spec (which nowadays defines how to parse any character stream, therefore including all non-conforming documents). :(
- YorickPeterse 11y agoHas this actually posed any problems for you? If so, could you report these as issues if you haven't already done so?
- hackerboos 11y agoHow does this compare to Ox? https://github.com/ohler55/ox https://github.com/ohler55/ox
- agumonkey 11y agoIs there a canonical set of document and benchmarks for xml parsers ?
- YorickPeterse 11y agoThis is briefly covered in https://github.com/YorickPeterse/oga#why-another-htmlxml-parser https://github.com/YorickPeterse/oga#why-another-htmlxml-par...: > Ox looks very promising but it lacks a rather crucial feature: parsing HTML (without using a SAX API). It's also again a C extension making debugging more of a pain (at least for me). Performance wise ox is generally a tad faster.
- languagehacker 11y agoNokogiri's problems are compounded in that a lot of major Ruby gems still use it, so sometimes you can't get around the long build time. A new parser is only one teeny tiny step towards fixing that problem. These are libraries other businesses now rely upon. Should the maintainers of this library risk the stability of the gem (and thus the reputation of the project) by swapping out such an important dependency? It's incumbent on the designers of the replacement and the community behind it to make such a case.