`lxml` is the MVP here. Fast, supports XPath, and handles big files well with `iterparse`.
If you’re stuck with SAX, wrap it in a generator function to make it less painful.
For nested XML, `xml.etree` + recursion works, but `lxml`’s XPath is way cleaner.
---
Yo, thanks for all the recs!
Gave `lxml` a shot with `iterparse` and it’s way better—RAM usage dropped big time. Still getting used to XPath though, any good cheat sheets out there?
Also, anyone tried `lxml` with multiprocessing for huge files? Wondering if it’s worth the hassle.
Cheers! 🚀
If you’re stuck with SAX, wrap it in a generator function to make it less painful.
For nested XML, `xml.etree` + recursion works, but `lxml`’s XPath is way cleaner.
---
Yo, thanks for all the recs!
Gave `lxml` a shot with `iterparse` and it’s way better—RAM usage dropped big time. Still getting used to XPath though, any good cheat sheets out there?
Also, anyone tried `lxml` with multiprocessing for huge files? Wondering if it’s worth the hassle.
Cheers! 🚀
