3 ms·
Yes, XML is verbose. It's also highly redundant (so it basically can't be hand written), undesrpecified (do I put this value as an atribute, value, or sub-elem
by marcosdumay 6y ago
Yes, XML is verbose.
It's also highly redundant (so it basically can't be hand written), undesrpecified (do I put this value as an atribute, value, or sub-element?), underpowered (how does it represent numbers? Byte streams?), complicated (have you ever created a DTD by hand?), and just out badly designed.
Of course, JSON and YAML share some of those same problems, and add some different ones. But the complaints about XML aren't some superfluous opinions about how it looks.
- Spivak 6y agoThe under-specified thing I think is funny because it’s the source of pretty much all the bad XML you see in the wild. For being an entirely tree oriented format it’s tragic flaw is that XML can’t actually represent nested dicts (or arrays for that matter) which turned out to be the data structures people actually wanted to work with. Oh there are lots of ways to beat XML into looking like it can do it but they’re all bad, break all the actual semantics of XML and turn a nice deserialization story of a tree where each node is a complete thing into mess. Turns out that very few people actually needed a tree of heterogeneous string k-v pairs.
- GoblinSlayer 6y agohttps://www.w3.org/TR/xmlschema-2/#built-in-primitive-datatypes https://www.w3.org/TR/xmlschema-2/#built-in-primitive-dataty... For comparison, time formats in JSON are all over the place.