3 ms·
In many respects the failure of XML to live up to the grandiose promises made in the 90s was due to the lack of decent tools around XML. Decent structure-aware,
by cmrdporcupine 4y ago
In many respects the failure of XML to live up to the grandiose promises made in the 90s was due to the lack of decent tools around XML. Decent structure-aware, refactoring, editors didn't exist then, and barely do now. XML cries out for something like paredit, but dumbed down and tag aware. The author shouldn't even have to see the textual representation of the tags.
But, primarily, the thing that made JSON win out is that it reflects the existing semantic/data-structure model of an actual programming language (and approximates that of many others.)
XML (and XSchema, oh god), has this mixture of associative and sequentially ordered data, and two separate kinds of associative/nesting models (elements vs attributes). It wants to eat the world with its new semantic model, but it doesn't offer any particular semantic advantages and doesn't match what programming languages (or relational databases for that matter) work with.
And then on top of that the syntax is just ugly to read.
Still there was a moment in the 90s where I found XML kind of exciting and interesting. I don't really recall why now? Seemed everybody did.
- rprospero 4y agoI also remember being excited about XML in the 90s and I can recall why. At the time, every application I used had its own bespoke file format and needed a custom parser to read its output. This especially applied to several applications storing hierarchical information in CSV files with their own way of delimiting CSV data as content in a CSV cell. The switch to XML meant that I'd have to figure out the tag soup that the developer had chosen for their XML data, but that was so much more comfortable than figuring out the goulash of ASCII escape tags in the old format. XML is like the pager. It might seem clunky today, but it's better than having to tell the baby-sitter the phone number for the restaurant and theatre you'd be visiting that night.
- syntheweave 4y agoThe interesting thing for me is that I've circled back to "CSV is good, actually" since for loosely structured source input, it has few equals - it lets you organize by cell, and you can use spreadsheet software to edit it. The balance shifts towards schema generation once you want to apply a specific model on the data, but "import CSV to my schema" is convenient as an interface to that. XML also has a place as an interface, but it's much more niche, since most interfaces that are hierarchical-document-shaped are going to parse text instead of bracketed entities. I think we got a bit excited about how well HTML worked at the time.
- apelapan 4y agoCSV is nice for tabular data. Especially if it is plain and straight forward in its nature. This covers a lot of use cases. For an object graph, CSV is less nice.
- cmrdporcupine 4y agoany graph can be represented as the set of tuples representing the edges. and in fact this is the most flexible form. it depends on if you need it "human readable" or not, but a hierarchical/network representation of a graph is only one representation
- apelapan 4y agoYeah, it is perfectly possible, I just don't think it is very nice. Neither for parsing nor for human reading. If I need a file or network message to represent a handful of object types with a bunch of relations that form a graph, I prefer XML (or JSON).
- timeon 4y ago> XML meant that I'd have to figure out the tag soup that the developer had chosen for their XML data There was DTD for that but probably rarely used.