[Python-Dev] folding cElementTree behind ElementTree in 3.3

Eli Bendersky eliben at gmail.com
Wed Feb 22 03:24:38 CET 2012


> I'm happy to stand up as an example of someone who uses a custom Element
> class.  My specific use case is loading the project Gutenberg database,
> which is a 210MB XML file.  I created a custom Element class which I use
> for the top-level element (a custom element_factory passed to
> TreeBuilder distinguishes between the top-level element and all others).
> The custom Element class doesn't add children, so it keeps ElementTree
> from storing all of the elements its seen so far.  On a system with 1 GB
> of RAM, there was no other way to get the file to load.
>
> So, I would be one of those people who would flood in the complaints. :)
>

Andrew, could you elaborate on your use case? Are you using cElementTree to
do the parsing, or ElementTree (the Python implementation). Can you show a
short code sample?

Thanks in advance,
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120222/5b97fa59/attachment.html>


More information about the Python-Dev mailing list