3 ms·
While there are much better parsers by now XML has some major problems (in no specific order): - it's quite complicated with a lot of niche issues many parsers
by dathinab 3y ago
While there are much better parsers by now XML has some major problems (in no specific order):
- it's quite complicated with a lot of niche issues many parsers don't handle nicely
- it has serious issues when it comes to semantic vs. non-semantic white spaces, this happens to not matter for some applications does does matter a lot for others
- it is in a uncanny valley between being good for human writing and good for machine consumption, for most use-cases there are objectively better formats
- people did ran into endless problems with it. Some at it's fault many more not but still associated with it. This gave it a negative image outlasting hype cycles.
- it needs to compete with JSON, which in many use-cases fails by default no matter if it's good choice or not
- compared to some alternatives there are often way too many ways to encode the same thing, this is also an issue e.g. for JSON, but way way worse for XML
- non us-ascii string encoding..., it's old enough for there to be a bunch of legacy messiness, often you can ignore it but not always
Now there are use-cases where XML was and is used with successful and I don't see that changing, but a resurgence of XML in other areas would IMHO be a failure of the IT industry to not learn from past mistakes. For data serialization (even if human readable) you want native support for maps and fully encoded strings (e.g. JSON), for configurations you most times want something more simple (sadly YAML fails this due to some subtle issues). For huge datasets you probably want something more compact then XML. Still there are some good use-cases for XML where it's many machine processed, but not only, not very little amount of data but not a huge amount, need for a lot of annotations, need to coordinate changing schemas of "cold stored" files of that format between different companies, mainly used for encoding in a file, not between life communicating servers. I.e. UI encodings without a custom language, some but not al cases of scientific data, dumps of complicated configurations normally never writing by humans, but sometimes inspected by them.
But please never again tightly couple it with security schemas, especially the way strings are handled in XML makes that a terrible choice for such use cases. And it's also not a grate choice for any life communication between programs.
- ShamelessC 3y agoArticle isn’t really about XML, fyi.