Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Steve M
I see you've had success with elementtree, but in case you are still thinking about SAX, here is an approach that might interest you. The idea is basically to turn your program inside-out by writing a standalone function to process one myID node. This function has nothing to do with SAX or parsing

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread rajarshi . guha
Stefan Behnel wrote: > [EMAIL PROTECTED] wrote: > > I have an XML file which contains entries of the form: > > > > > > 1 > > 2 > > > > 1 > > Thanks to everybody for the pointers. ElementTree is what I ended up using and my looks like this (based on the ElementTree tutorial code):

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Stefan Behnel
[EMAIL PROTECTED] wrote: > I have an XML file which contains entries of the form: > > > 1 > 2 > > 1 > > > Currently, I have written a SAX based handler that will read in all the > entries and return a list of the contents of these > entries. However this is not scalable and for my

Re: iterate over a series of nodes in an XML file

2006-07-05 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Hi, I have an XML file which contains entries of the form: > > > 1 > 2 > > 1 > > > Currently, I have written a SAX based handler that will read in all the > entries and return a list of the contents of these > entries. However this is not scalable and fo

iterate over a series of nodes in an XML file

2006-07-05 Thread rajarshi . guha
Hi, I have an XML file which contains entries of the form: 1 2 1 Currently, I have written a SAX based handler that will read in all the entries and return a list of the contents of these entries. However this is not scalable and for my purposes it would be better if I could iterat