untangle 将XML转换为Python对象

untangle简介

untangle,Python第三方库,可以将XML转换为Python对象,然后通过Python代码便可方便访问XML中的数据。

untangle应用实例

import untangle
obj = untangle.parse(resource)
obj.root.child['name'] # u'child1'

#XML文件
<?xml version="1.0"?>
<root>
	<child name="child1"/>
</root>

untangle Github统计数据

MIT license

Github 604 stars

untangle安装命令

pip install untangle

untangle Python版本要求

Works with Python 3.7 - 3.10

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.