2

I'm in a scenario that get XML data from the file and parse it into Dictionary but inside the XML data is contain some value like binary

"%¢a÷ó<·RxgТ'gÎ&"

then I got the error :

parser.Parse(xml_input, True) xml.parsers.expat.ExpatError: reference to invalid character number: line 4032, column 15

Here is my sample python code:

import xmltodict
with open(myFile, 'r', encoding='UTF-8') as fd:
   doc = xmltodict.parse(fd.read())
Sidara KEO
  • 1,693
  • 1
  • 14
  • 34

0 Answers0