What's the best way to parse XML in Python? Looking for a reliable xml parser python solution. or Str

24 Replies, 2319 Views

ElementTree is slow af for large files, no lie. Lxml is better, but if you’re *really* struggling, check out `defusedxml` for security + performance.

Also, pre-processing your XML (removing junk nodes) can help. Tools like `xmlstarlet` can clean things up before you even touch Python.

Just my 2 cents—hope it helps!

Messages In This Thread



Users browsing this thread: 1 Guest(s)