Changes by Florent Xicluna florent.xicl...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8277
___
___
Florent Xicluna florent.xicl...@gmail.com added the comment:
IIUC it works like that by design.
The ElementTree 1.3 (which is part of Python 2.7 and 3.2) allows to define your
own parser which parses comments (see previous comments).
Close as won't fix?
--
nosy: +scoder
resolution: -
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
ElementTree does parse comments, it just omit them in the tree.
A quick search lead me to this page: http://effbot.org/zone/element-pi.htm
which can be further simplified:
from xml.etree import ElementTree
class
Changes by Brian Curtin cur...@acm.org:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8277
___
___
Python-bugs-list mailing list
Patrick W. p...@borntolaugh.de added the comment:
Thanks for your reply, Amaury. That page really might mean that it was not
intended for ElementTree to parse such things by default. Although it might be
nice if there was some easy way to simply enable it, instead of having to hack
it into
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
yes, my code uses the newer version of ElementTree which will be included with
2.7 and 3.2
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8277
New submission from Patrick W. p...@borntolaugh.de:
When using xml.etree.ElementTree to parse external XML files, all XML comments
within that file are being stripped out. I guess that happens because there is
no comment handler in the expat parser.
Example:
test.xml
example
nodeA