XML parsing per record
William Park
opengeometry at yahoo.ca
Sat Apr 16 22:16:04 EDT 2005
Willem Ligtenberg <WLigtenberg at gmail.com> 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?
>
> Thanks in advance,
>
> Willem Ligtenberg A total newbie to python by the way.
You may want to try Expat (www.libexpat.org) or Python wrapper to it.
You can feed small piece at a time, say by lines or whatever. Of
course, it all depends on what kind of parsing you have in mind. :-)
Care to post more details?
--
William Park <opengeometry at yahoo.ca>, Toronto, Canada
Slackware Linux -- because it works.
More information about the Python-list
mailing list