neo1973-germany/unitc/xmldom.py

13 lines
271 B
Python
Raw Normal View History

#!/usr/bin/env python
import xml.dom.minidom
unitfile = 'unit.xml'
file = xml.dom.minidom.parse(unitfile)
name = file.documentElement
for categorynames in file.getElementsByTagName('category'):
if categorynames.getAttribute('name') == 'length':