I am trying to read XML file "Comments.xml" which is almost 19 GB, but it gives memory error. I tried it in every IDE, but nothing works. i have 4 GB ram. i also searched, googled but did not find any clue :/ my code is
I tried it in every IDE, but nothing works. i also searched, googled but did not find any clue :/
import xml.etree.ElementTree as ET
tree = ET.ElementTree(file='Comments.xml')
root = tree.getroot()
for rows in root:
print(rows.attrib)
when i run the IDE stick for some time then i get the error: line 598, in parse self._root = parser._parse_whole(source) MemoryError