for event, elem in context:
    func(elem, *args, **kwargs)
elem.clear()
for ancestor in elem.xpath('ancestor-or-self::*'):
    while ancestor.getprevious() is not None:
        del ancestor.getparent()[0]
del context

def process_element(elem):
    print(elem.xpath('description/text( )'))
context = etree.iterparse(MYFILE, tag='item')
fast_iter(context, process_element)
Using Python Iterparse For Large XML Files