4 ms·
The idea of XML, namely typed, semi-structured data with namespaces, was a good one. What sucks is the particular implementation chosen. XML is implemented usin
by anyfoo 9y ago
The idea of XML, namely typed, semi-structured data with namespaces, was a good one. What sucks is the particular implementation chosen. XML is implemented using SGML, a completely archaic, overly general beast that gives us DTDs, entities and countless other warts that make exhaustively parsing and handling XML the insurmountable pain that it is.
Seriously, I urge you to look into SGML and to explore what a weird behemoth it is, and to then realize that SGML is what XML grew out of.
Unfortunately, XML was so bad that the developer community suffered some form of whiplash from it, and promptly decided to run into the opposite direction: JSON, which--superficially at least--seemed to be the simple and easy answer to the problems XML was causing.
However, I don't think that XML's problems were in its ideas, but that JSON is taking away too much that had only been perceived as bad, because it came coupled to such a flawed implementation overall.
And now we have efforts like JSON Schema, which emerge out of the realization that writing the same typecheckers over and over again for nearly every use case is tedious at best, and error-prone and unsafe at worst.
So maybe we will get our conveniently typed and namespaced semi-structured data in the end, but I blame XML that we had to take a detour over vanilla JSON to eventually get there.
- xchaotic 9y ago"conveniently typed and namespaced semi-structured data in the end" - I don't think that thing will be much more simple than XML - it needs to cover Unicode, data types, namespaces, modularity and you end up with XML-level of complexity. I know wheel gets reinvented a lot in software, but with data formats you also need tools, adoption, compatibility - XML wins here
- anyfoo 9y agoIt might not be very simple, but I certainly hope it does not necessarily imply SGML levels of cruft. The things you have covered don't need any of that cruft. You are right that adoption is a major hurdle for any new solution, if it's even attainable, but that's pretty much my point. I'm sad that XML came to reach critical adoption for semi-structured data, and not something else.
- pllbnk 9y agoI think the reason for this increasing complexity comes from efforts to be satisfy every single use case. When everybody starts pitching in in the creation of the standards with their weird corporate use cases and actual specification writers try to satisfy each and every one of them. There is no reason schema specification has to be very complex. Instead, it can be made open for extension but be very concise and with clear boundaries itself.
- olavk 9y agoXML is really great for its intended problem domain. Try to represent XHTML or DOCBOOK or similar rich-document formats as JSON and it will be a disaster. But for structured data you don't need the verbosity and extra baggage of XML, JSON is simply a cleaner solution. Problem is, people are looking for one-size-fits-all solution, but no format will be optimal for all use cases. XML is a passable all-round format though, even if it is not always optimal.