Fri Jul 14 02:54:50 2006

Ticket #57

add support for iterparse tag filter ?


Priority: normal Reporter: effbot
Severity: normal Assigned to: effbot
Component: elementtree Status: new
Version: elementtree-1.3 Resolution:  
Milestone: elementtree-1.3-final Keywords:  

Description by effbot:

from the lxml mailing list:

From: Stefan Behnel

> I finally decided to take a shot at iterparse() and it turned out to be a
> matter of hours to implement it. It's very similar to ET's implementation and
> builds on top of the SAX2 interface of the libxml2 parser.

I also added a small extension to iterparse: the 'tag' keyword argument. It
works as in element.getiterator(tag) and restricts the start/end events to the
named tag. The start-ns and end-ns events are not impacted. This is mainly a
convenience extension for cases where all interesting data is stored below a
certain element type.

Changelog

Fri Jul 14 02:55:10 2006: Modified by effbot

  • summary changed from add support for getiterator tag filter ? to add support for iterparse tag filter ?