3 ms·
One of the problems that XML aims to solve is that you can get two XML documents and combine elements of them into a third one, maintaining the right semantics,
by gugagore 5y ago
One of the problems that XML aims to solve is that you can get two XML documents and combine elements of them into a third one, maintaining the right semantics, even if each of the documents use the `<foo>` tag to mean different things. It accomplishes this with namespacing.
In my experience, it's a headache to handle namespaces in XML, e.g. when trying to refer to tag names in an XPath query.
That is one example of how XML goes beyond S-expressions. I still don't think it's a particularly hard problem.
- qsort 5y agoThere's no reason why any of that couldn't be replicated with JSON, YAML or even with S-expressions. To play the devil's advocate, one of the nice features of XML is schemas. The reason why complex formats with validation etc. don't really work out is that they are most often used for data in transit as opposed to data at rest. The correct format for typed data at rest that conforms to a schema is a SQL database and that won't change any time soon. If you're working with data in transit, schemas, validation etc. are more trouble than they're worth.
- regularfry 5y agoThere's no reason why it couldn't be replicated, but it isn't - at least, not in any way with broad traction. It's not useful to compare something that could exist but doesn't with something that not only exists but is universal in its ecosystem. That universality is a feature in itself.