neo1973-germany/unitc/xmldom.py
PatrickBeck b1217d34a7 initial revision of unit_converter
git-svn-id: http://www.neo1973-germany.de/svn@38 46df4e5c-bc4e-4628-a0fc-830ba316316d
2008-03-13 16:41:13 +00:00

12 lines
271 B
Python

#!/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':