[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Change by Stefan Behnel : -- Removed message: https://bugs.python.org/msg340994 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Issue 24287 is a duplicate of this one and has some additional discussion. -- ___ Python tracker ___ __

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Ticket 24287 is a duplicate of this one and has some additional discussion. -- ___ Python tracker ___ _

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Comment/PI parsing in general is implemented in issue 36673. Note that there is currently no way to represent comments and PIs in the tree when they appear outside of the root element, which I think is what this ticket is about. After issue 36673 is resolved,

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-23 Thread Nikolaus Rath
Nikolaus Rath added the comment: I have created issue 20375 with a patch to document the current behavior. -- ___ Python tracker ___ __

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-21 Thread Stefan Behnel
Stefan Behnel added the comment: > Unless there are objections, I'll try to work on a patch that either > documents that PIs are lost, or optionally adds them to the tree when parsing > (depending on how difficult that turns out to be). Please do. It should not be difficult at all to make the

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-20 Thread Nikolaus Rath
Nikolaus Rath added the comment: For the record: I disagree that this is an enhancement. ElementTree supports PIs as first-class tree elements. They can be added, inspected, removed, and written out when serializing into XML. Only when reading in XML, they are silently dropped. I think this is

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-20 Thread Stefan Behnel
Stefan Behnel added the comment: > As for backwards compatibility: yes, this is a concern. The keyword argument > would be a solution. On the other hand, I'm not sure that the default should > be something that causes dataloss...? It's a matter of use cases. How often do people care? My experi

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-19 Thread Nikolaus Rath
Nikolaus Rath added the comment: No, I really mean XML processing instruction. I agree with you that the XML declaration is a non-issue, because there is no information lost: you know that you're going to write XML, and you manually specify the encoding. Thus it's trivial to add the correct XM

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-19 Thread Stefan Behnel
Stefan Behnel added the comment: When you write "XML PI", do you mean the XML declaration? At least that's what Mark used in his original example. ET avoids writing them out when they are not necessary, i.e. for UTF-8 compatible encodings. IMHO that's perfectly ok and definitely not an incorre

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-19 Thread Stefan Behnel
Changes by Stefan Behnel : -- nosy: +eli.bendersky, scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue9521] xml.etree.ElementTree skips processing instructions when parsing

2014-01-18 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: xml.etree.ElementTree strips XML declaration and procesing instructions -> xml.etree.ElementTree skips processing instructions when parsing ___ Python tracker __