Best way to parse XML in Python? Need help with 'python parse xml'! or Struggling to parse XML files

22 Replies, 1489 Views

For python parse xml, `ElementTree` is fine, but `lxml` handles broken XML better.

Biggest tip: always close your files properly, or use `with` statements.

Seen too many leaks from sloppy parsing code.

Messages In This Thread



Users browsing this thread: 1 Guest(s)