What's the best way to parse HTML/XML with Python lxml? or Python lxml: How do you handle namespaces

18 Replies, 1957 Views

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.

Messages In This Thread



Users browsing this thread: 1 Guest(s)