Lxml ftw! The XPath support alone makes it worth it. BeautifulSoup is nice for beginners, but once you get comfy with XPath, there’s no going back.
Also, python lxml’s performance is *insane* for large files. I once parsed a 50MB XML file with BS4 and it choked. Switched to lxml and it was like night and day.
Downside? The docs are a bit... sparse. But StackOverflow usually has your back.
Also, python lxml’s performance is *insane* for large files. I once parsed a 50MB XML file with BS4 and it choked. Switched to lxml and it was like night and day.
Downside? The docs are a bit... sparse. But StackOverflow usually has your back.
