Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Efficiently Process Big Xml Files With CElementTree

DZone's Guide to

Efficiently Process Big Xml Files With CElementTree

·
Free Resource
ElementTree 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()
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}