3 ms·
You can use ElementTree's iterparse() function (also available for lxml) to do incremental parsing while still having XPath-like functionality available for the
by jaen 16y ago
You can use ElementTree's iterparse() function (also available for lxml) to do incremental parsing while still having XPath-like functionality available for the elements you like (manually calling the .clear() method to release memory).
http://effbot.org/zone/element-iterparse.htm http://effbot.org/zone/element-iterparse.htm