Issue 1602189: Suggest a textlist() method for ElementTree (original) (raw)

Issue1602189

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/44272

classification

Title: Suggest a textlist() method for ElementTree
Type: enhancement Stage:
Components: XML Versions: Python 2.6

process

Status: closed Resolution: accepted
Dependencies: Superseder: Update to latest ElementTree in Python 2.7 View:1143
Assigned To: effbot Nosy List: effbot, loewis, rhettinger
Priority: normal Keywords:

Created on 2006-11-24 10:00 by rhettinger, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
xmldemo2.py rhettinger,2006-11-24 10:00 Implementation and examples
Messages (4)
msg54942 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2006-11-24 10:00
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
msg54943 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-11-29 08:20
Why was this assigned to fdrake? Fredrik, can you please take a look? If not, please unassign.
msg54944 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2006-11-29 10:02
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.
msg55812 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2007-09-11 06:13
ElementTree 1.3 provides a variant of this (tentatively called "itertext").
History
Date User Action Args
2022-04-11 14:56:21 admin set github: 44272
2007-09-11 06:15:21 effbot set status: open -> closed
2007-09-11 06:13:45 effbot set resolution: acceptedsuperseder: Update to latest ElementTree in Python 2.7messages: +
2006-11-24 10:00:41 rhettinger create