Fredrik Lundh added the comment:
Footnote: "iterparse" does things this way mostly to keep the implementation
simple and fast; due to buffering, the tree builder are usually ahead of the
event generation with up to 16k. See the note on this page:
http://effbot.org/zone/element-iterparse.htm
New submission from Jeroen Dirks :
I am using cElementTree.iterparse in order to parse through a huge XML
document and filter out sections of interest.
The usage pattern is that I wait for an "end" event for a element of
interest and then if it matches a some criterium I write it out using
cElem