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

24 Replies, 2322 Views

Yo, had the same issue last month. Lxml + `iterparse` is the combo you need.

But here’s a wildcard: `untangle`. It’s not the fastest, but it turns XML into Python objects, which can be easier to work with if speed isn’t *critical*.

For memory, avoid loading the whole file. Parse in chunks or use a SAX parser.

Messages In This Thread



Users browsing this thread: 1 Guest(s)