3 ms·
My reasoned objection to XML, having used it for many years, is that it is unconscionably expensive to parse. At scale, XML is extremely computationally expensi
by jandrewrogers 6y ago
My reasoned objection to XML, having used it for many years, is that it is unconscionably expensive to parse. At scale, XML is extremely computationally expensive in almost every dimension. It is not a good way to represent almost any non-trivial data structure, but that is frequently its sole use case. XML is a great way to expand your carbon footprint in the data center.
Today, there are very, very few cases where I would recommend XML despite it being widely specified for standards.
- zaphar 6y agoWhile I don't usually reach for XML when I need a data transport format this particular criticism is somewhat unwarranted. SAX parsing of XML is pretty cheap computationally. The problem is cultural more so than technical. Pretty much every language ships with a DOM parser. Not all of them ship with a SAX parser. As a result DOM is the more predictably available choice. DOM Parsing is both computationally and memory expensive though which I think is where XML gets this reputation from.
- rjkennedy98 6y ago> SAX parsing of XML is pretty cheap computationally. SAX parsing is also very complex programatically. Who wants to switch on various SAX events when handling a XML document? No, we want the full thing parsed into an object. I've spent a decent amount of time in the XML world and I've only seen people use SAX when performance was a large concern or when parsing enormous XML documents.