Hey. I want to have a config.xml file for settings in a Python web app.
I made car.xml manually. It looks like this:
<car>
<lights>
<blinkers>off</blinkers>
</lights>
</car>
Now I want to see whether the blinkers are on or off, using xml.etree.ElementTree.
import xml.etree.ElementTree as ET
tree = ET.parse('car.xml')
blinkers = tree.findtext('lights/blinkers')
print blinkers
> off
Now I want to turn the blinkers on and off, how can I do this?