TypeError: cannot serialize 111 (type int)
def save_xml(xml_filename, xml_code):
xml_string = ET.tostring(xml_code, encoding="utf-8")
xml_file = open(xml_filename, 'wb')
xml_file.write(xml_string)
xml = ET.Element('products')
test = ET.SubElement(xml, 'int')
test.text = 111
save_xml('date.xml', xml)