4 ms·
All formats do indeed suck, but not equally (YAML does suck equally, though). Your point about HTML is the best argument for XML though, since every client need
by nathcd 5y ago
All formats do indeed suck, but not equally (YAML does suck equally, though). Your point about HTML is the best argument for XML though, since every client needs an 8 million LOC HTML parser anyway.
It was probably a mistake to resurrect this flame war about serialization formats. XML works, it's just a bummer.
- mananaysiempre 5y agoA parser for what most people think of as XML can be fairly simple, certainly simpler than a performant or even just error-tolerant parser for HTML. Though Yxml[1] is probably overdoing it, what with its lack of Unicode handling or tree construction, a couple of tens of kilobytes seems like the right order of magnitude to me. Heavier than JSON, but not drastically so, unless you decide you also need three types of schemas, two types of XPath, XSLT, etc. (the libxml2[2] approach). The thing that requires the most bookkeeping is also the thing that nobody uses and not a lot of people even know about: a full textual macro system by the name of <!ENTITY ...> (the “internal DTD subset”), which a conformant XML processor is required to implement. (Not coincidentally, this is the part that the XML profile mandated by XMPP excludes.) There was a proposal to define something that excludes this part by the name of MicroXML[3], but it threw out compatibility by also excluding namespaces, and it doesn’t seem it actually went anywhere. [1]: https://dev.yorhel.nl/yxml https://dev.yorhel.nl/yxml [2]: http://www.xmlsoft.org/ http://www.xmlsoft.org/ [3]: https://www.w3.org/community/microxml/wiki/Main_Page https://www.w3.org/community/microxml/wiki/Main_Page