| import xml.etree.cElementTree as etree |
| import xml.etree.ElementTree as etree |
| for e in elem.getchildren(): |
| def children (elem, name=None): |
| l = [e for e in l if e.tag == name] |
| xml = etree.parse(sys.argv[1]) |
| for schema in child(xml.getroot(), "schemalist").getchildren(): |
| e = child(schema, "short") |
| e = child(schema, "long") |
| for locale in children(schema, "locale"): |
| # One locale must exist so leave C locale... |
| a = locale.attrib.get("name") |
| e = child(locale, "default") |
| e = child(locale, "short") |
| e = child(locale, "long") |
| xml.write(sys.stdout, "UTF-8") |