You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 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':