Re: elementtree: line numbers and iterparse

2006-09-12 Thread Stuart McGraw
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Stuart McGraw wrote: > > Now I find i need to get and save the input file line > > number of each node. Googling turned up a way > > to do it by subclassing FancyTreeBuilder, > > (http://groups.google.com/group/comp.l

Re: elementtree: line numbers and iterparse

2006-09-12 Thread Fredrik Lundh
Stuart McGraw wrote: > I have a broad (~200K nodes) but shallow xml file > I want to parse with Elementtree. There are too many > nodes to read into memory simultaneously so I use > iterparse() to process each node sequentially. > > Now I find i need to get and save the input file line > numbe

elementtree: line numbers and iterparse

2006-09-12 Thread Stuart McGraw
I have a broad (~200K nodes) but shallow xml file I want to parse with Elementtree. There are too many nodes to read into memory simultaneously so I use iterparse() to process each node sequentially. Now I find i need to get and save the input file line number of each node. Googling turned up