Hello Guys,
I have a small element tree task here whereby I need to crack open an XML
file, modify the text for one element and then resave it back again. I'm
currently trying to do this like follows:
# Parse the XML file.
application_settings = etree.parse('/configuration/application.xml')
# Modify the single_send_mode element.
application_settings.find("single_send_mode").text =
new_configuration["single_send_mode"]
# Save the XML file.
application_settings.write("/configuration/application_new.xml")
This runs without error however it doesn't save the text into the
'single_send_mode' element and I end up with a configuration file which
contains <single_send_mode /> in it.
Can anyone offer any suggestions on how to get this to work properly?
Thanks guys, I appreciate it.
Heston
--
http://mail.python.org/mailman/listinfo/python-list