I've learned the hard way that the only legitimate use for XML is to maintain compatibility with things that already use XML. It doesn't have a direct translation to any sensible data structure other than DOM. It sucks as a markup language since document writers find syntax errors anathema. I've seen the idea of XSD schemas used as a defense since then you at least have a schema unlike JSON. However, experience has taught me that in practice everyone does XML wrong so that's of limited value at best. I guess there is a limited situation in which you have pre-existing XSLT to translate between two pre-existing XML interfaces but eww.