Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invalid character '&#x0' encountered

I am getting following exception while parsing the xml.

Fatal error at line -1  Invalid character '&#x0' encountered. No stack trace

I have Xml data in string format and I am parsing it using DOM parser. I am parsing data which is a response from Java server to a Blackberry client. I also tried parsing with SAX parser,but problem is not resolved. Please help.

like image 527
iOSDev Avatar asked Jun 09 '09 04:06

iOSDev


1 Answers

You have a null character in your character stream, i.e. char(0) which is not valid in an XML-document. If this is not present in the original string, then it is most likely a character decoding issue.

like image 74
Thorbjørn Ravn Andersen Avatar answered Oct 03 '22 11:10

Thorbjørn Ravn Andersen