in reply to Xml error

The reason is exactly what the message says it , char 0, null, its not valid character to have in xml.

Typically, if not a literal print "\0" this means your program is not Encoding the output correctly