New submission from Stelios: import xml.etree.cElementTree as ET
events = ET.Element('Events') tree = ET.ElementTree(events) tree.write('test.xml', xml_declaration=True, encoding='UTF-8') writes to file: <?xml version='1.0' encoding='UTF-8'?> <Events /> Where opening tag <Events> is missing Python version: Python 3.5.2 ---------- components: XML messages: 280515 nosy: chefarov priority: normal severity: normal status: open title: xml.etree.cElementTree.write misses opening tag type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28659> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com