3 ms·
XML is an extensible framework starting with two main things: a data model (very good) and a text-based surface syntax that is portable across a great many char
by dasht 17y ago
XML is an extensible framework starting with two main things: a data model (very good) and a text-based surface syntax that is portable across a great many character set encodings.
Encoding binary data (as, say, CDATA) and then shipping or storing it in the text-based syntax is every bit the lose you suggest it is. Binary XML formats, however, can answer your objection - the main problem being that no good binary XML format is yet widely adopted.
You say "`Some day' doesn't do us any good today." I half agree. It is true that, today, if you want to use XML for large binary data you have to place your bet on a suitable binary format and you face a rocky road. XML "sucks" in that sense. On the other hand, if you can possibly - for the problem you are trying to solve - make a good bet on a binary format for XML, then it is a fine choice because the data model for XML as interchange format is excellent. So using it for binary today is not an option in many cases and has an element of risk on other cases - but longer term is a winning bet. Your benefit for considering it today is that longer term pay-off. "Go long" on XML.
- tentonova 17y agoXML proponents always trot out "we're just not there yet" or "the basic idea is good, we just need some small fixes", or "parsers just need improvement -- use a better parser library", or any other number of excuses as to why XML doesn't actually suck, it's just a victim of poor implementations or to-be-fixed design inadequacies. Meanwhile, Protobuf and Thrift work today. They're fast, they're size efficient, and unlike XML, they're simple. It's time to stop making excuses for XML. It's an inexcusable ball of poorly designed unjustifiable complexity created by architecture astronauts run amok. I'm disappointed at the upvotes on a whole page of platitudes on why XML isn't a bad format, it's just misunderstood.