If you’re stuck with a giant XML file, maybe don’t parse it all at once?
`lxml` + `iterparse` is the classic move, but `xml.sax` is lighter.
Or, if you’re lazy (like me), throw it into a database (PostgreSQL has XML support) and query it from there.
`lxml` + `iterparse` is the classic move, but `xml.sax` is lighter.
Or, if you’re lazy (like me), throw it into a database (PostgreSQL has XML support) and query it from there.
