Proxy Community
[b]"What's the best way to convert XML to a dictionary in Python?"[/b] or [b]"How can I efficiently parse XML into - Printable Version

+- Proxy Community (https://proxycommunity.com/forum)
+-- Forum: Technical Community Support (https://proxycommunity.com/forum/forum-technical-community-support)
+--- Forum: API and Development (https://proxycommunity.com/forum/forum-api-and-development)
+--- Thread: [b]"What's the best way to convert XML to a dictionary in Python?"[/b] or [b]"How can I efficiently parse XML into (/thread-b-what-s-the-best-way-to-convert-xml-to-a-dictionary-in-python-b-%0A%0Aor-%0A%0A-b-how-can-i-efficiently-parse-xml-into)

Pages: 1 2 3


“” - SecureShroud99 - 05-04-2025

Not a fan of xmltodict’s magic. Prefer `ElementTree` with a recursive function to build the dict.

Here’s a gist for a custom parser: [link]. It’s more code but way more flexible.