XML parsing per record

Kent Johnson kent37 at tds.net
Sat Apr 16 11:51:21 EDT 2005


Willem Ligtenberg wrote:
> I want to parse a very large (2.4 gig) XML file (bioinformatics ofcourse :))
> But I have no clue how to do that. Most things I see read the entire xml
> file at once. That isn't going to work here ofcourse.
> 
> So I would like to parse a XML file one record at a time and then be able
> to store the information in another object.
> How should I do that?

You might be interested in this recipe using ElementTree:
http://online.effbot.org/2004_12_01_archive.htm#element-generator

Kent



More information about the Python-list mailing list