| ▲ | janci 11 hours ago | |
My reasons to hate XML: - element vs attribute ambiguity - model of the document does not fit nicely to programming model of structs, dicts and arrays - too many complexities (entities, cdata, parser directives) - cardinality unknown without schema (is that a single value, or an array that just happens to have one element) - order of elements may or may not be significant depending on schema - not really extensible if the original schema does not explicitly allow for extensibility - some types of valid XML documents are not representable by a schema (e.g. any number of different elements in any order) - verbosity - namespace identifiers being URIs that may or may not be resolvable What I want for general data exchange is JSON with comments and sane namespaces. Edit: line wraps | ||
| ▲ | frollogaston 2 hours ago | parent [-] | |
JSON does data exchange ok. Protobuf does it very well. Google fumbled its ecosystem, should've focused on establishing it as an easy alternative to HTTP+JSON, instead focused on gRPC which is its own thing. Textproto is quite readable and supports comments, great for config files. XML is so much fuss for nothing. All that xmlns uri whatever stuff and it still doesn't tell the other side how to parse it. | ||