You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/scoder'closed_at=<Date2019-05-01.19:31:14.974>created_at=<Date2019-04-20.07:33:22.803>labels= ['expert-XML', '3.8', 'type-feature', 'library']
title='Comment/PI parsing support for ElementTree'updated_at=<Date2019-05-01.20:38:32.025>user='https://github.com/scoder'
The TreeBuilder in xml.etree.ElementTree ignores comments and processing instructions. It should at least have a way to pass them through, even if there is not currently a way to append comments and PIs to the tree when they appear *outside* of the root element.
The pull parser interface would directly benefit from this, because it can then report "comment" and "pi" events.
This is related to bpo-9521 but not a strict duplicate, because fixing that would require actually adding comments and PIs to the tree when they are not within the root element. When they are, it's in line with the current tree model and this change will do it.