(xml_string)
return minidom.parseString(xml_string).toprettyxml()
Takes an xml string and returns an indented and properly tabbed version of the string
Takes an xml string and returns an indented and properly tabbed version of the string
Takes an xml string and returns an indented and properly tabbed version of the string
def indent_xml(xml_string):
    """
    Takes an xml string and returns an indented and properly tabbed version of the string
    """
    if isinstance(xml_string, str):
        xml_string = xml_string.encode('utf-8')
    return minidom.parseString(xml_string).toprettyxml()
def indent_xml ( xml_string ) : if isinstance ( xml_string , str ) : xml_string = xml_string . encode ( 'utf-8' ) return minidom . parseString ( xml_string ) . toprettyxml ( )