Caz*_*Caz 5 python xml minidom
我想获得一个元素的所有属性(不知道属性的名称).那有什么功能吗?谢谢
Zas*_*has 8
>>> docu = '<a href="http" alt=":)"></a>' >>> dom = xml.dom.minidom.parseString(docu) >>> a = dom.getElementsByTagName("a")[0] >>> a.attributes.items() [(u'alt', u':)'), (u'href', u'http')]
归档时间:
14 年,3 月 前
查看次数:
4853 次
最近记录:
11 年,7 月 前