def render(file):
with file.open() as fp:<EOL><INDENT>encoding = detect_encoding(fp, default='<STR_LIT:utf-8>')<EOL>file_content = fp.read().decode(encoding)<EOL>parsed_xml = xml.dom.minidom.parseString(file_content)<EOL>return parsed_xml.toprettyxml(indent='<STR_LIT:U+0020>', newl='<STR_LIT>')<EOL><DEDENT>
Pretty print the XML file for rendering.