Hi,

I have an xml file of about 140Mb like this:

<book>
  <record>
...
     <wordpartWTS>1</wordpartWTS>
  </record>
  <record>
    ...
    <wordpartWTS>2</wordpartWTS>
  </record>
  <record>
...
    <wordpartWTS>1</wordpartWTS>
  </record>
</book>

I want to traverse it from bottom to top and add another field to each
record         <totalWordPart>1</totalWordPart>
which would give the highest value of wordpartWTS for each record for
each word

so if wordparts for the first ten records were 1 2 1 1 1 2 3 4 1 2
I want totalWordPart to be 2 2 1 1 4 4 4 4 2 2

I figure the easiest way to do this is to go thru the file backwards.

Any ideas how to do this with an xml data file? 

Thanks

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to