I don't hate XML in and of itself. It's a pretty huge format with tons of features that nobody has any use for. Namespaces alone are next to worthless for the vast majority of use-cases, and add useless complexity to the standard. Doctypes are another thing that is essentially useless for almost every single use-case, and entity declaration is similarly pointless. All for a markup format. Individually, these things have some small use in very niche areas, making XML itself a very useful language. These things also make it unbelievably difficult to build a fully compliant XML parser, which is why there are so few (the vast majority of XML parsers that exist are only "mostly" compliant).
The problem is that almost every single use of XML should not be using XML. XML is used in tons of places where it's absolutely unnecessary, because the developers are using it as a config file format, or for serialization, or for IPC, or for simple structured data storage, or (worst of all) user-written input data. All of these would be better off with JSON, YAML, INI, or CSV (maybe even protobuf, capn proto, or msgpack, where binary is appropriate). XML is great, for example, in places where you need to consistently reference large amounts of data (where entity declarations are useful), or where you have a ton of hierarchical data of mixed formats and you absolutely can not afford a name collision. For this reason, XML is fantastic for generated documents (like ODF and DOCX), for text-heavy markup (like XHTML and RFC), and other generated files with tons of stored datatypes where name collision is likely (like GNUCash's files, though a database is better). Tangentially, it's also useful anyplace you might want to apply XSLT.
That's all. I hate XML not because XML itself is bad (it really isn't). I hate XML because it was treated as a panacea in the late 90s and early 00s, and was shoved down everybody's throat like some magic bullet, and now we're stuck with it in dozens of places it doesn't make sense. XML RPC is stupid, SOAP is shit, MusicXML is shit, and so are a ton of other special-purpose formats with limited datatypes that would be better off using almost anything else. If JSON came 5 years earlier we might have been spared. Ironically, the place that XML is absolutely perfect for (the web), it's been almost rejected compared to HTML, so adoption of XHTML has always been way behind, and even now you have to carefully write/generate HTML that happens to be conformant XHTML if you want it to be accepted as both, because writing XHTML that isn't also HTML will make a bunch of shitty browsers choke on it.
The absolutely simplest serialization format/markup language that fits the spec, accounting for possible extension (ie. don't choose something like JSON if you're going to need querying or stylesheet transformations eventually). Usually I use INI/TOML for user-written config format, YAML for user-written that needs more power and saner hierarchies, JSON for computer generated serialization that might need user-reading and writing, and move my way up from MSGPack to protobuf or Capn Proto for anything binary, based on the level of features I might need (Capn Proto since Protobuf 3 did retarded shit with default values, effectively making it impossible to tell whether a field is intentionally a 0 or was unset without a separate enum AND doesn't let you set a different default; Fucking stupid removing features between version 2 and 3).
So in summary, XML isn't bad; the people who use it are bad.