Python解析XML文件
此篇仅作学习笔记使用,有关xml解析的例子请看: 菜鸟教程 Python XML 解析 xml文件的例子: <?xml version="1.0" encoding="utf-8" ?> <coll_audit> <collection id="001"> <collname>SMSC_AO8</collname> <host>10.0.6.141</host> <user>bill</user> <passwd>N-bill01</passwd> <src_path>/var/opt/nokia/smsc/logdata/auditfiles</src_path> <src_rule>SMSC_AO8_YYYYMMDD</src_rule> <dest_rule></dest_rule> <dest_path>/jzcj3/coll_audit/SMS_NKA/auditfile</dest_path> </collection> <collection id="002"> <collname>SMSC_AO9</collname> <host>10.0.6.142</host> <user>bill</user> <passwd>N-bill01</passwd> <src_path>/var/opt/nokia/smsc/logdata/auditfiles</src