I am trying to print out the xml doc with pretty_print option. But it thew an error
TypeError: tostring() got an unexpected keyword argument 'pretty_print'
Am I missing something here?
def CreateXML2():
    Date = etree.Element("Date", value=time.strftime(time_format, time.localtime()));
    UserNode = etree.SubElement(Date, "User");
    IDNode = etree.SubElement(UserNode, "ID");
    print(etree.tostring(Date, pretty_print=True));
 
     
     
    