python xml DOM? pulldom? SAX?

Fredrik Lundh fredrik at pythonware.com
Mon Aug 29 20:18:42 CEST 2005


Alan Kennedy wrote:

> SAX is perfect for the job. See code below.

depends on your definition of perfect...

using a 20 MB version of jog's sample, and having replaced
the print statements with local variable assignments, I get the
following timings:

5 lines of cElementTree code: 7.2 seconds
60+ lines of xml.sax code: 63 seconds

(Python 2.4.1, Windows XP, Pentium 3 GHz)

</F> 






More information about the Python-list mailing list