That's a pretty absurd complaint.

Are you aware of any XML parser ever which preserves the plaintext formatting of the .xml file while magically inserting and modifying an arbitrary amount of XML data anywhere within the document?

SVG is just XML. Save your file in Inkscape, and then run `tidy` on it, or whatever you like for format your XML with.

(As a fellow hand-crafted XML fan, I feel your pain. But I also know when to choose my battles!)

You are of course correct.

Running `tidy` is of not enough help. I handle the situation by saving into a new file, then copy-paste the changed bits into my hand-crafted SVG and clean them up.

Ideally I try to avoid Inkscape altogether. Which is hard, as it's just too good.

Well duh the inkscape team should write this feature just for them. For free of course lol. My god