Re: When to clear elements using cElementTree

2012-10-19 Thread Ben Temperton
I managed to solve this using the following method: """Returns a dictionary of indexes of spectra for which there are secondary scans, along with the indexes of those scans """ scans = dict() # get an iterable context = cElementTree.iterparse(self.info['filename']

When to clear elements using cElementTree

2012-10-18 Thread Ben Temperton
Hi there, I am parsing some huge xml files (1.8 Gb) that look like this: some data some data some data What I am trying to do is build up a dictionary of lists where the key is the parent scan num and the members of the list are the child scan nums. I ha

finding the byte offset of an element in an XML file (tell() and seek()?)

2012-06-14 Thread Ben Temperton
Hi there, I am working with mass spectroscopy data in the mzXML format that looks like this: ... ... ... ... . 160409990 160442725 160474927 160497386 Where the offset element contains the byte of