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

2006-03-07 Thread kepioo
An example ( i changed the content to make it easier) : ### input file 3 fruits 5 10 25 names vincent Robert open the car fruits 25 8

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

2006-03-07 Thread kepioo
An example ( i changed the content to make it easier) : ### input file 3 fruits 5 10 25 names vincent Robert open the car fruits 25 8

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

2006-03-07 Thread Peter Hansen
kepioo wrote: > Peter, > > I cannot really process as your advice : it is not that stereotypical > entrieswe built a data structure for the xml and we report various > types of events, always under the same format but with different > contents types. > > The script i am writing aims at pickin

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

2006-03-07 Thread kepioo
Thanks Diez for your suggestion, I'll look around to find out more about the seek function ( i learnt python 2 weeks ago and I do not have a programmer background, but so far, I am doing well). Peter, I cannot really process as your advice : it is not that stereotypical entrieswe built a data

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

2006-03-07 Thread Peter Hansen
kepioo wrote: > 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

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

2006-03-07 Thread Diez B. Roggisch
> 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. Well, the overall amount of data won't change. But I can understand that decision. However, you might consider usi

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

2006-03-07 Thread kepioo
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

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

2006-03-07 Thread Diez B. Roggisch
kepioo schrieb: > 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 > shoul

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

2006-03-06 Thread kepioo
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