Yo, had the same issue last month. Lxml + `iterparse` is the combo you need.
But here’s a wildcard: `untangle`. It’s not the fastest, but it turns XML into Python objects, which can be easier to work with if speed isn’t *critical*.
For memory, avoid loading the whole file. Parse in chunks or use a SAX parser.
But here’s a wildcard: `untangle`. It’s not the fastest, but it turns XML into Python objects, which can be easier to work with if speed isn’t *critical*.
For memory, avoid loading the whole file. Parse in chunks or use a SAX parser.
