This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from xml.dom.minidom import Document | |
def SubElement(parent, element_name, **attributes): | |
"""helper function to create elements in a way similar to ElementTree""" | |
doc = parent.ownerDocument | |
element = doc.createElement(element_name) | |
parent.appendChild(element) | |
for attr_name, attr_value in attributes.items(): |