[b]"What's the best way to parse XML in Python? Need help with 'parse xml python'!"[/b] or [b]"Struggling to parse

16 Replies, 1163 Views

For parse xml python, I’d recommend `lxml` if you can install it. Way faster, especially for big files.

But if you’re stuck with built-ins, `ElementTree` + `iterparse` is your best bet.

Namespaces? Yeah, they’re a headache. Use `{namespace}tag` syntax or ignore ‘em if possible.

Here’s a good SO thread on this: [link-to-stackoverflow]

Messages In This Thread



Users browsing this thread: 1 Guest(s)