nvivek has asked for the wisdom of the Perl Monks concerning the following question:

Dear friends,

I am using XML::Simple->XMLin function for reading data from XML file and converting into perl hash. Whenever XML data contains control characters in it, I am receiving above error. How to solve that error to convert the XML data to hash. I tried setting <?xml version="1.0" encoding="iso-8859-1"?> and <?xml version="1.0" encoding="UTF-8"?>, but still I am unable to parse the XML data to a perl hash. Kindly anyone suggest me a solution.