<example>
<login>
<id>1</id>
<username>kites</username>
<password>kites</password>
</login>
</example>
How can i update p开发者_如何学运维assword using lxml? and now can i add one more record to the same file?
please provide me a sample code
example = etree.Element("example")
login = etree.SubElement(example, "login")
password = etree.SubElement(login,"password")
password.text = "newPassword"
This is a good tutorial
精彩评论