[issue28659] xml.etree.cElementTree.write misses opening tag

2016-11-10 Thread Xiang Zhang

Xiang Zhang added the comment:

 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')


abc

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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28659] xml.etree.cElementTree.write misses opening tag

2016-11-10 Thread Xiang Zhang

Xiang Zhang added the comment:

s/not/note

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28659] xml.etree.cElementTree.write misses opening tag

2016-11-10 Thread Stelios

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:



Where opening tag  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com