Improved diagnostics for XML parsing in Python.