How to parse large xml files


#1

Hi Guys,

I need help. I need to parse 60bg single xml file in python. Can you please help me with this. parsing in one go gives memory error.

Regards
Deepak


#2

You can parse it by using an iterator, line by line -
Example on this link - http://boscoh.com/programming/reading-xml-serially.html


#3

Hi ayush,

Thanks a lot. I did the same way.

Regards
Deepak