2 ms·
> I'm confused. SGML/XML is capable of representing arbitrary tree structures (with metadata attached to the nodes), is it not? So is ASN.1, but nobody in thei
by dozzie 9y ago
> I'm confused. SGML/XML is capable of representing arbitrary tree structures (with metadata attached to the nodes), is it not?
So is ASN.1, but nobody in their right mind would use ASN.1 as a markup
language. The sole fact that it is possible to cram the structure into the
format doesn't mean it's a good idea.
- xelxebar 9y agoWait. A tree is just nested tags, right? I feel like I'm missing something. Here I'm thinking of the correspondence between trees and strings of nested parentheses. So, strings like (a (b c) d) (e f) carry a tree structure, and any (non-associative) multiplication is just a fold operation over a tree. In this case it's like we tag each set of prentheses with a name/operation, so naively XML would seem to naturally represent this kind of thing. I have little actually experience using XML directly though, so am genuinely curious as to what so terrible or "crammy" about my ideas here.
- fusiongyro 9y agoThere's a lot of weird ideas floating around in the comments on this link. I don't think you are on the wrong track. There is some mismatch between what XML was designed for and the problems XML is good at solving. It was most certainly designed to be easy for humans to read and write manually. In practice, it is a great interchange format, by which I mean the specific idea of different parties writing XML for exchange between each other, because it can be validated mechanically. There is a large and powerful ecosystem of software that has sprung up around it which simply isn't there for s-exps or JSON. Elsewhere on here, marcoperaza points out that it is kind of against hacker ethic. That's true. But enterprise software often involves multiple separate organizations having to agree on what a document can contain, and XML is great for that, and that use case tends to be more valuable in industry than whether it is the tersest, most flexible or readable format.
- fulafel 9y agoI can not vouch for right-mindedness, but the ASN.1 Markup Language web site[1] mentions "Encoding XML-defined messages using ASN.1" [1] http://xml.coverpages.org/asn1-aml.html http://xml.coverpages.org/asn1-aml.html