lisp is winner in DOM parsing contest! 8-]

Hans Nowak hans at zephyrfalcon.org
Sun Jul 11 21:32:11 EDT 2004


Alex Mizrahi wrote:

> i have 3mb long XML document with about 150000 lines (i think it has about
> 200000 elements there) which i want to parse to DOM to work with.
> first i thought there will be no problems, but there were..
> first i tried Python.. there's special interest group that wants to "make
> Python become the premier language for XML processing" so i thought there
> will be no problems with this document..
> i used xml.dom.minidom to parse it.. after it ate 400 meg of RAM i killed
> it - i don't want such processing.. i think this is because of that fat
> class impementation - possibly Python had some significant overhead for each
> object instance, or something like this..

Have you tried ElementTree?

http://effbot.org/zone/element-index.htm

HTH,

--
Hans Nowak (hans at zephyrfalcon.org)
http://zephyrfalcon.org/




More information about the Python-list mailing list