I have an XML reader application who reads through thousands of XML files, during the processing I received the following error:
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 62, column 48
After debugging I found out its file_348.xml
which is presented in below code. Now I don't know what's wrong with this XML file, when I open it manually I receive the same error. Is it a corrupt error? What I want is my application to ignore these kind of bad XML files and go on with the ones that are readable. If you have any other workarounds I Would like to hear them
import xml.etree.ElementTree as ET
path = 'C:/data/UserA/Desktop//XML-files/file_348.xml'
tree = ET.parse(path)
print(tree)