Hello, I am trying to use XmlReader to parse an XML file. With many other XML files I have had no problems, but a file I have to work with begins as follows:
When I try to parse the file, I get an exception: error number 21 at line 4; “error in processing external entity reference”.
Does anyone know if there is a way around this? Suppressing the known errors would be an acceptable solution for this particular project.
My current thinking is to re-write the XML file, line by line, skipping lines 2 through 5, then parsing the new file - but I wondered if there was a more elegant way.
Unfortunately, this is a file that is incoming from a 3rd party, but I could ask them to check. But if I change the ‘%’ to ‘&’ I get different exceptions.
The original XML is legal according to the ‘Check This Document’ feature of my XML editor ‘EditiX’.