Efficiently Process Big Xml Files With CElementTree
Join the DZone community and get the full member experience.
Join For FreeElementTree is becoming python's standard XML framework.
It also supports processing data as it coming/loading.
import cElementTree
for event, elem in cElementTree.iterparse(file):
if elem.tag == "record":
... process record element ...
elem.clear()
Opinions expressed by DZone contributors are their own.
Comments