Message208445
I can confirm this. The actual problem is that neither XML nor SGML PIs in the input make it into the etree, and no events are generated for them during incremental parsing.
XML PIs that are added into the tree using Python functions are correctly written out. SGML PIs currently cannot be represented at all (there's no ElementTree.SGMLProcessingInstruction analogous to ElementTree.ProcessingInstruction)
There is special cased support for the DOCTYPE element in the TreeBuilder class to allow retrieving the doctype when not parsing incrementally, but it needs to be retrieved manually and written out manually.
I have attached a testcase for XML PIs. For proper SGML PI handling, ElementTree first needs to learn about them.
Recommended stage for this issue: needs patch |
|
Date |
User |
Action |
Args |
2014-01-19 04:52:22 | nikratio | set | recipients:
+ nikratio, effbot, mark |
2014-01-19 04:52:22 | nikratio | set | messageid: <1390107142.04.0.93645433408.issue9521@psf.upfronthosting.co.za> |
2014-01-19 04:52:21 | nikratio | link | issue9521 messages |
2014-01-19 04:52:21 | nikratio | create | |
|