(item, aliases)
| 21 | parent.remove(e) |
| 22 | |
| 23 | def try_apply(item, aliases): |
| 24 | attrib = item.attrib |
| 25 | for name in ('ReferenceType', 'DataType'): |
| 26 | try: |
| 27 | value = attrib[name] |
| 28 | attrib[name] = aliases[value] |
| 29 | except KeyError: |
| 30 | pass |
| 31 | |
| 32 | def read_nodes(path): |
| 33 | tree = ET.parse(path) |