3 ms·
All this "XML is too strict" and other XML FUD seems like a very strange irrational mind virus to me. XML has only five special symbols (two angle brackets, amp
by Mikhail_Edoshin 10y ago
All this "XML is too strict" and other XML FUD seems like a very strange irrational mind virus to me. XML has only five special symbols (two angle brackets, ampersand, and two quotes), and about as many syntax rules as is necessary to write a deterministic parser with one-symbol lookahead. JSON is less well designed in this aspect (mostly because it was never meant to be a data-exchange format); for example, it requires separators between elements and this is more cumbersome for data generators than self-contained XML elements.
We already have a not-too-strict programming language JavaScript and now we have to accompany it with JavaScript: the good parts and You don't know JavaScript N-volume series and remember a curious difference between "return <EOL> {..." and "return { <EOL>...". I don't think being too forgiving is such a good idea.
Edit: punctuation.
- tannhaeuser 10y agoMikhail I've got nothing against XML and have done a ton of apps using it. Going back to XML's beautiful big sister SGML (please forgive me this metaphor) is very much about keeping to use markup tech for web sites (where XML isn't practical for HTML5). In fact, SGML gives you a formal way to parse HTML into XHTML and thus into XML-based processing pipelines.
- kedean 10y agoYou misread my point. I wasn't complaining about the strictness, I was stating that it was the reason nobody willingly writes XML or XHTML by hand. The problem with strictness is that the world is lazy, and HTML is meant for a much wider set of people than your average general-purpose programming language. That wide group of people may do anything with their markup, and a language that accounts for that will be more successful than one that does not, plain and simple. XML is just fine as a data-interchange format, and I'm fine with it there (though I personally prefer JSON anywhere that it'll fit). It's when humans are introduced into the equation that XML and it's derivatives fall over.