Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The content is not a valid XML

Status
Not open for further replies.

chedderslam

Programmer
Jun 16, 2008
24
US
I am getting this errror:

The content is not a valid XML:An invalid XML character (Unicode: 0x0) was found in the element content of the document.

I originally thought it was the &, so I used the escape character, but I am still getting this error. Can anyone tell me where the invalid character is? Here is the document:
<?xml version="1.0"?><errorlog> <error> <comments>Driver 1: License Status: FINANCIAL RESPONSIBILITY SUSPENSION CHECK VEHICLE REG, MAY SEIZE DL & TAG is unacceptable</comments> <system_message>Driver 1: License Status: FINANCIAL RESPONSIBILITY SUSPENSION CHECK VEHICLE REG, MAY SEIZE DL & TAG is unacceptable</system_message> </error></errorlog>
 
The unquestionable part is the presence of "&" in the element context. Replace it with "&amp;" and see what the application has to say.
 
That's the thing. I have already replaced the & with &amp;, but I am still getting the same message.

What character does Unicode 0x0 represent?
 
That part is unquestionable: not trial and error type. You must have it replaced to proceed.

Check the encoding of the document. Without that encoding in the prolog, it is taken as utf-8. What if the file is encoded in utf-16? If that is a "physical" file, use hex editor to examine it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top