What's the best way to parse and manipulate XML in Python? or How do you handle XML data efficiently

18 Replies, 869 Views

ElementTree is fine, but lxml is *way* better for complex python xml tasks.

For large files, SAX is ugly but works. Or split the XML first.

Namespaces? `lxml.etree` lets you ignore ’em with `*` in XPath.

Also, `xmlschema` lib helps if you’re validating.

Messages In This Thread



Users browsing this thread: 1 Guest(s)