问题
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?
来源:https://stackoverflow.com/questions/61813902/parsing-xml-files-3gb-using-lxml-etree-iterparse