The biggest problem to me is that XML is not a data serialization language, it's a document markup language. In documents, the distinction between attributes and content makes sense. In data serialization, the choice of whether a given datum is an attribute or a text content appears rather arbitrary. Should I write this?
XML Cookbook
Jane Doe
Or this?
Now attributes don't work when there are multiple values, so I guess I should use attributes for single values and child nodes for lists:
Jane Doe
Tim Pickens
But that rule also has problems. If I decide to include markup in the title, it suddenly needs to be a child node again:
The Awesome XML Cookbook
Jane Doe
Tim Pickens
Also, "author" is a misleading name for a field that is actually an array, so should I actually use an "authors" node to make that clearer?
XML Cookbook
Jane Doe
Tim Pickens
Or maybe:
XML Cookbook
Now compare to this to YAML:
book:
title: XML cookbook
authors:
- name: Jane Doe
- name: Tim Pickens
Or even just:
book:
title: XML cookbook
authors: [ Jane Doe, Tim Pickens ]
I need to make way fewer design choices when writing that down. In fact, I probably don't need to design anything since that's already the data structure that I've written down as a type somewhere in my code. That's why it's a good idea to use a data serialization language for, well, data serialization.