What's the best way to handle XML parsing with Python etree? or Python etree: How do you efficiently

16 Replies, 1229 Views

I’m surprised no one’s mentioned defusedxml yet. If security’s a concern (and it should be!), Python etree and lxml can both be risky with malicious XML.

Defusedxml patches those holes. It’s a drop-in replacement, so no learning curve.

Still, for everyday stuff, I default to Python etree—just keep defusedxml in your back pocket.

Messages In This Thread



Users browsing this thread: 1 Guest(s)