News for hackers. Stuff that matters.
Re:XML is almost always misused by RantyDave on Tuesday October 29, 2019 @08:43PM (#21393600)
I beg to differ. For a start, XML compresses well and besides, storage is monster cheap these days. XML is a better storage format because it documents what the data is (a title, a reference etc) as well as the data itself.

There are many better reasons to hate XML.

Re:XML is almost always misused by hnick on Tuesday October 29, 2019 @11:33PM (#21394461)
XML does compress well as text or over the wire but the parsing trees can be quite large in memory and processing consumption. At least in Perl I've had enough scripts crash out due to this overhead when implementing the common/naive solution using off the shelf modules. You can get around this by choosing between DOM or SAX but I consider that a symptom of the problem, you choose XML to solve a problem and now you have another problem to solve.
Re:XML is almost always misused by Mikhail_Edoshin on Wednesday October 30, 2019 @06:28AM (#21396149)
I had the same problem with npm, I think, and JSON, because npm could not simply load the huge JSON file into memory. A huge anything can crash a naively written tool used to handle smaller instances.
Re:XML is almost always misused by hnick on Wednesday October 30, 2019 @06:44PM (#21403744)
That's true but I think XML has the edge there. It has so many features like defining new types which you wouldn't normally see in JSON. One parser we used had a ten to one ratio - 50MB of XML meant 500MB of RAM usage when using a DOM parser. And that's taking into account the textual representation of XML is already >50% bloat with the closing tags etc.