1、加载读取XML文件,xml.dom.minidom.parse(a水瑞侮瑜bc.xml),这是xml文件的对象。获取标签之间的数据 ,rootdata.getElementsByTagName(caption)。
2、引入XML组件:import xml.dom.minidom。
3、创建一个xml文件,<?xml version="1.0" encoding="utf-8"?>。
4、相关推荐:《Python教程》
5、获取XML文档对象,root = dom.documentElement。
6、总结一下xml对象,no蟠校盯昂de.getAttribute(AttributeName),获取XML节点属性值,node.getElementsByTagName(TagName),获取XML节点对象集合,等等具体的查看手册。