Message102051
| Author | poke |
|---|---|
| Recipients | poke |
| Date | 2010-04-01.01:37:43 |
| SpamBayes Score | 3.876941e-05 |
| Marked as misclassified | No |
| Message-id | <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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> |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2010-04-01 01:37:47 | poke | set | recipients: + poke |
| 2010-04-01 01:37:46 | poke | set | messageid: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> |
| 2010-04-01 01:37:44 | poke | link | issue8277 messages |
| 2010-04-01 01:37:43 | poke | create | |