I wrote a Python script to add a node to an xml file. Although it works fine, the xml comes out oddly formatted. For example, a new node is added, and if it's the last one for a parent node, the parent node closing tag is now immediately after the new node's closing tag. This is fine technically, but we wanted the xml to "look" good too.
So I installed xmlformatter add-on for Python. Although it lets me format the look of the xml properly, it is changing the encoded ampersands in my text values to actual ampersands, thus breaking the xml.
I tried googling this but couldn't find any mention of it. Can anybody suggest a way to prevent this? I tried changing the encoding_output to various values or eliminating it altogether, but nothing helps.
Thanks...