Trying to parse a HUGE(1gb) xml file

Tim Harig usernet at ilthio.net
Sat Dec 25 20:13:29 EST 2010


On 2010-12-25, Adam Tauno Williams <awilliam at whitemice.org> wrote:
> On Sat, 2010-12-25 at 22:34 +0000, Nobody wrote:
>> On Sat, 25 Dec 2010 14:41:29 -0500, Roy Smith wrote:
>> XML is typically processed sequentially, so you don't need to create a
>> decompressed copy of the file before you start processing it.
>
> Yep.

Sometimes that is true and sometimes it isn't.  There are many situations
where you want to access the data nonsequentially or address just a small
subset of it.  Just because you never want to access data randomly doesn't
mean others might not.  Certainly the OP would be happier using something
like XPath to get just the piece of data that he is looking for.



More information about the Python-list mailing list