I use minidom to parse xml data from a file.
I know how to get the data:
"""
""" Parse the xml file """
xmlDocument = minidom.parse(self.configFile)
""" Parse xml main section """
mainSection = xmlDocument.getElementsByTagName('Config')
""" Parse xml Global section """
configSection = mainSection[0]
""" Parse Ports section """
socketList = configSection.getElementsByTagName('Sockets')
"""
Now I want to change a string that a retrieved from the file and write it back to where it was. So, I get something, change it and write it back.
How do I put the new string in the place of the old? How do I overwrite the first value with the new value?
Thanks,
|
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
