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
{{ message }}
Repository navigation
Suggest a textlist() method for ElementTree #44272
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
GitHub fields:
assignee=Noneclosed_at=<Date2007-09-11.06:15:21.380>created_at=<Date2006-11-24.10:00:41.000>labels= ['expert-XML', 'type-feature']
title='Suggest a textlist() method for ElementTree'updated_at=<Date2007-09-11.06:15:21.379>user='https://github.com/rhettinger'
This patch has a implementation and example for a method to recursively extract prose from nested XML markup. This improves the utility of ElementTree for documents where otherwise contiguous PCDATA are broken-up by inspersed tags (e.g. xhtml or docbook fragments).
Why was this assigned to fdrake? Fredrik, can you please take a look? If not, please unassign.
effbot commented on Nov 29, 2006
effbotmannequin
Mannequin
More actions
This is pretty much identical to the gettext and flatten helpers in the ElementLib utility library (see effbot.org for links and code). The current plan is to make some of these available as helper functions in ElementTree 1.3 (=Python 2.6), rather than methods.
I'm leaving this open as a reminder to self.
effbot commented on Sep 11, 2007
effbotmannequin
Mannequin
More actions
ElementTree 1.3 provides a variant of this (tentatively called "itertext").
Activity
rhettinger commentedon Nov 24, 2006
This patch has a implementation and example for a method to recursively extract prose from nested XML markup. This improves the utility of ElementTree for documents where otherwise contiguous PCDATA are broken-up by inspersed tags (e.g. xhtml or docbook fragments).
See attached file or the ASPN recipe at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498286
loewis commentedon Nov 29, 2006
Why was this assigned to fdrake? Fredrik, can you please take a look? If not, please unassign.
effbot commentedon Nov 29, 2006
This is pretty much identical to the gettext and flatten helpers in the ElementLib utility library (see effbot.org for links and code). The current plan is to make some of these available as helper functions in ElementTree 1.3 (=Python 2.6), rather than methods.
I'm leaving this open as a reminder to self.
effbot commentedon Sep 11, 2007
ElementTree 1.3 provides a variant of this (tentatively called "itertext").