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

18 Replies, 1644 Views

Lxml all day. The learning curve is steeper, but once you’re over it, you’ll wonder how you ever lived without XPath.

BS4 is like training wheels—great to start, but eventually you’ll want more control. And python lxml gives you that. Plus, the performance is *bonkers* for large datasets.

Hidden gem: `lxml.cssselect` if you prefer CSS selectors over XPath.

Messages In This Thread



Users browsing this thread: 1 Guest(s)