def add_child(parent, tag, text=None):
elem = ET.SubElement(parent, tag)<EOL>if text is not None:<EOL><INDENT>elem.text = text<EOL><DEDENT>return elem<EOL>
Add a child element of specified tag type to parent.
The new child element is returned.