用python修改xml节点后如何保存回xml文件里?
<?xml version="1.0" encoding="utf-8"?><config> <id>0</id> <log_path>E:/Python</log_path></config>
from xml.etree import ElementTreexml_file='config.xml'xml=ElementTree.ElementTree(file=xml_file).getroot()xml.find('id').text=1