100 ms·
> the abstract concept behind XML is just to provide a metalanguage for the representation of hierarchical data What you are describing here is s-expressions,
by EdiX 4y ago
> the abstract concept behind XML is just to provide a metalanguage for the representation of hierarchical data
What you are describing here is s-expressions, XML represents a far more specific type of data structure: a tree of nodes where each node is either a text node or a tag node. Text nodes are always terminal, tag nodes can either be terminal or not. Tag nodes also have a list of attributes, while text nodes do not. Each attribute is a key value pair where both the key and the value are text, but the key can only contain certain characters, whereas the value is unrestricted.
This is all fairly complicated and it doesn't really map well to almost anything.
Even the description is longwinded. You say:
> JSON got closer to the representation of list and hashmaps, but I see this as a mere convenience
I say that calling it "mere" convenience is underselling it. The data model of XML is of so little use that no programming langauge, besides XSLT, offers it as part of the language.
Vice versa hashmaps and list are nearly universal.
> I think it's incorrect to part from the assumption that nobody's gonna need a schema language, a query language, a mapping language or whatever
I didn't say that. I said that with XML the need for those tools is especially pressing because XML is such a poor fit for any programming language.
> you see many people creating their own version of a json schema because it's really needed
Sure, but you also see very low adoption for json schema, because it isn't needed as much as xml schema was.
- kaba0 4y agoSo object graphs are rare in your opinion?