Message102051
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 />
<!-- some comment -->
<nodeB />
</example>
test.py
-------
from xml.etree import ElementTree
with open( 'test.xml', 'r' ) as f:
xml = ElementTree.parse( f )
ElementTree.dump( xml )
Result
------
<example>
<nodeA />
<nodeB />
</example> |
|
| Date |
User |
Action |
Args |
| 2010-04-01 01:37:47 | poke | set | recipients:
+ poke |
| 2010-04-01 01:37:46 | poke | set | messageid: <[email protected]> |
| 2010-04-01 01:37:44 | poke | link | issue8277 messages |
| 2010-04-01 01:37:43 | poke | create | |
|