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.
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.
