Xiang Zhang added the comment:

<Events /> is an empty tag. It closes it self, not '/>'.

With some content, you can see it has start and end tag.

>>> import xml.etree.cElementTree as ET
>>> events = ET.Element('Events')
>>> events.text = 'abc'
>>> tree = ET.ElementTree(events)
>>> tree.write('/tmp/a.xml', xml_declaration=True, encoding='UTF-8')

<?xml version='1.0' encoding='UTF-8'?>
<Events>abc</Events>

----------
nosy: +xiang.zhang
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
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

Reply via email to