SAX/Python : read an xml from the end to the top

kepioo nkammah at yahoo.fr
Mon Mar 6 21:48:55 EST 2006


I currently have an xml input file containing lots of data. My objectiv
is to write a script that reports in another xml file only the data I
am interested in. Doing this is really easy using SAX.

The input file is continuously updated. However, the other xml file
should be updated only on request.

Everytime we run the script, we track the new elements in the input
file and report them in the output file.

My idea was to :
_ detect in the output file the last event reported
_ read the input file from the end
_ report all the new events ( since the last time the script was run).



Question : IS it possible to read an XML file and process it from the
end to the beginning, using SAX????




More information about the Python-list mailing list