开发者

delete xml node using lxml

开发者 https://www.devze.com 2022-12-19 06:11 出处:网络
admin . . . . admin this my xml file. when i user clear()or del method it will clear all the child and a blank node is creating

admin . . . . admin

this my xml file. when i user clear()or del method it will clear all the child and a blank node is creating

<user/>

How can i avoid creating this blank node

it will make problem when i use findall() and try to access any of its 开发者_开发技巧child

can anyone provide me a piece of code to del the node fully???


Removing match user node from parent Node would be suitable for this case.

0

精彩评论

暂无评论...
验证码 换一张
取 消