Thanks Rabi, but im afraid it is not working. I tried both options 0 and 1 with xmlReaderForFile ( ) but the parser exits when if finds the special character. Kindly advice. Regards, Ajay
________________________________ From: Rabi Narayan Sahoo [mailto:[email protected]] Sent: Monday, February 02, 2009 6:09 PM To: Ajay KonanurMurthy (WT01 - Retail, CPG, Transportation and Services); [email protected] Cc: [email protected] Subject: RE: [xml] Help: Exception handling in libxml2 Hi Ajay You can use the API xmlReaderForMemory () / xmlReaderForFile () to parse the memory/file by passing the option parameter as 0 (XML_PARSE_RECOVER) . This option (XML_PARSE_RECOVER) will enable the parsing to be done in recover mode and parser will continue to parse the file/memory even if it encounters fatal errors. Thanks & Regards Rabi Innovation Never Stops ! -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, February 02, 2009 11:51 AM To: [email protected] Subject: [xml] Help: Exception handling in libxml2 Hello, I am using the XML reader API of libxml2 to parse an XML file. While parsing , I get the following error: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xC7 0x41 0x49 0x53 <Name>AMITIÉS FRAN╟AISES ANTWERPEN</Name>. Whenever I get this non-utf8 error, I would want to log it and pass on to the next node for processing without exiting the program. Is this exception handling possible with xmlreader? Regards, Ajay _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
_______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
