3 ms·
It's an excellent question. My answer is, use XML for data if you need features that come with it, such as validation, or if you'll want to use it with tools/s
by hcayless 16y ago
It's an excellent question. My answer is, use XML for data if you need features that come with it, such as validation, or if you'll want to use it with tools/standards that orbit XML, like XQuery, or if you have a situation where you're dealing with both documents and data, and you want them to interoperate. Otherwise there's probably not a lot of benefit to XML; JSON, YAML, or a DSL will suit you just fine.
A lot of XML-hate comes from its overuse—it comes with overhead that is too expensive for simple cases, but is pretty useful when you go beyond simple. Right tool for the right job and all that...