Struggling with parsing XML in Python lxml? Need help with XPath or performance tips? or What’s the b

16 Replies, 1000 Views

For debugging XPath, I use `lxml.etree.XPathEvaluator` with `verbose=True`. It’s a lifesaver.

Also, `lxml` is *way* faster than ElementTree for big files, but if you’re stuck, maybe try `untangle` for small stuff? It’s not as powerful, but super simple.

Namespaces? I just regex the hell out of the XML before parsing. Dirty, but effective.

Messages In This Thread



Users browsing this thread: 1 Guest(s)