Serves you right for using XML. What a garbage data format.

Seriously, though, my workplace used XML for almost all its config and serialization as a choice made ages ago. Almost everyone agrees now that it sucks. Doesn’t really give us any advantages over a simpler representation like JSON, which would be far, far easier to parse and create in Python (the language our application uses). Far less verbose to read manually, too (most of the XML is specifically XML-RPC representation, so types are super verbose — except a bunch of XMLs are also 100% manually parsed and created, so there isn’t even consistency).

I actually just came up with a tool to convert it to JSON as well as sort all the dictionaries by key (something that Python’s JSON can do automatically) so that we can actually compare these XML files without their dictionary data moving all around, making diffs impossible. I’d kinda love to just plug that converter in as an upgrader so we could use JSON going forward, but I feel like it’s not worth it to complicate the upgrade path so much (and we must have backwards compatibility for years). There’s plenty of config files where I’d love to change the structure of something to be less dumb, but it doesn’t make sense to do so since I’d *still* have to keep the old code around for backwards compatibility…