How to read a xml-file sequentially

Thomas Weholt thomas at gatsoft.no
Tue Oct 30 13:17:37 CET 2001


Hi,

I need to read a xml-file sequentially, piece by piece, when a given end-tag
to a given start-tag is found, the xml-data inbetween the start and end are
sent to a different method for processing, then the next piece of data is
read, sort of like old-school record-based files.

Only the needed data is kept in memory.

How can this be done using preferrably expat or sax? No DOM cuz the files
are huge.

Thomas





More information about the Python-list mailing list