Jump to content

Error in XML file


geethaprasadv

Recommended Posts

Is the XML well-formed otherwise?Does it work with "UTF-16" or "UTF-8" encoding instead?

Link to comment
Share on other sites

yes the xml is well formed, it woks with utf-8 and utf-16le also but the problem comes only when i try to save the file in unicode big endian.

i want to generate an xml file in UTF-16BE, but when i am trying to generate the following error message is occured:"Invalid at the top level of the document".can anyone let me know what could be the possible reason?
the attribute i am using is "<?xml version="1.0" encoding="UTF-16"?>"
Link to comment
Share on other sites

Try saving your document as Unicode big endian, instead of UTF-8 or Unicode.To do so in Notepad, click Save As and in the encoding drop down menu select "Unicode big endian". Of course, you should also select "All files" and type in the exact name, but I bet you already know that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...