Parsing Xml files >3gb using lxml etree iterparse

982 Views Asked by At

I am not able to parse XML file of huge size using lxml tree. What I came to know from my research is that lxml iterparse loads the xml file until it gets tag which it is looking for. This is snippet of my code :-

for event, child in etree.iterparse(xml_file,tag='test'):
        print(sys.getsizeof(child))

It is not even reaching print statement and is getting killed. Any help on this matter?

0

There are 0 best solutions below