SAX/Python : read an xml from the end to the top
kepioo
nkammah at yahoo.fr
Tue Mar 7 06:58:01 EST 2006
Hi Diez,
thank you for your answer. Let me give you more background on the
project.
The input xml I am parsing is always well formed. It is coming out from
another application that append to this xml. I didn't see the source
code of the application, but i know that it is not re-writing the whole
xml. I thinnk it is just removing the last root element, adding the new
tags and writing again the </root> tag.
We don't want to create new output files for every entry ( each entry
is an event, and we have approximativaly 5 events per minute). So I
have to stick with this xml input file.
I guess, i will parse it till I find the last reported event and update
the output xml from there, reporting only the events I am interested
in....I hope SAX won't take too much time to do all this...(let's say 1
event = 10 tags, 5 events/minutes, xml file running for 1 month -->
5400 000 opening tags)...
What do you think?
More information about the Python-list
mailing list