I am trying to rewrite an XML file at a specific point.
I have a tag ['db']['usa']['user']['id']['number'] - for example...
I need to replace the value of the tag number. I opened the file
with open('myFile.xml', 'a') as file:
myFile = xmltodict.parse(file.read())
and then I just say that
myFile['db']['usa']['user']['id']['number'] = 1
But it doesn't really change the value to 1
How could I open an xml file and rewrite a specific value to a tag?
Thanks