So I'm trying to parse an xml file, and replace a tag value. I'm able to do this fine with tree.find(). However, the issue comes when I then write the data to a new xml file. The new xml file has the replaced value that I added, but a bunch of other stuff in the xml seems to be changed as well, in terms of formatting. It completely removed my first line of
?xml version="1.0" encoding="UTF-8"...>
and changed a lot of the namespaces. I'm wondering what I can do to just leave everything else of my original xml, but just replace that one value.
Thanks