Skip to content

Suggest a textlist() method for ElementTree #44272

Closed

Description

@rhettinger
BPO 1602189
Nosy @loewis, @rhettinger
Superseder
  • bpo-1143: Update to latest ElementTree in Python 2.7
  • Files
  • xmldemo2.py: Implementation and examples
  • 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 = None
    closed_at = <Date 2007-09-11.06:15:21.380>
    created_at = <Date 2006-11-24.10:00:41.000>
    labels = ['expert-XML', 'type-feature']
    title = 'Suggest a textlist() method for ElementTree'
    updated_at = <Date 2007-09-11.06:15:21.379>
    user = 'https://github.com/rhettinger'

    bugs.python.org fields:

    activity = <Date 2007-09-11.06:15:21.379>
    actor = 'effbot'
    assignee = 'effbot'
    closed = True
    closed_date = <Date 2007-09-11.06:15:21.380>
    closer = 'effbot'
    components = ['XML']
    creation = <Date 2006-11-24.10:00:41.000>
    creator = 'rhettinger'
    dependencies = []
    files = ['8282']
    hgrepos = []
    issue_num = 1602189
    keywords = []
    message_count = 4.0
    messages = ['54942', '54943', '54944', '55812']
    nosy_count = 3.0
    nosy_names = ['loewis', 'effbot', 'rhettinger']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = '1143'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1602189'
    versions = ['Python 2.6']

    Activity

    1. rhettinger commented on Nov 24, 2006

      @rhettinger
      ContributorAuthor

      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

    2. added
      type-feature
      on Nov 24, 2006
    3. added
      type-feature
      on Nov 24, 2006
    4. loewis commented on Nov 29, 2006

      loewismannequin
      Mannequin

      Why was this assigned to fdrake? Fredrik, can you please take a look? If not, please unassign.

    5. effbot commented on Nov 29, 2006

      effbotmannequin
      Mannequin

      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.

    6. effbot commented on Sep 11, 2007

      effbotmannequin
      Mannequin

      ElementTree 1.3 provides a variant of this (tentatively called "itertext").

    7. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      topic-XMLtype-feature

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions