Alex Rivera | Logout

XML - Data At Root Level is Invalid

Asked 2008-11-14T21:14:15.850
40

I have an XSD file that is encoded in UTF-8, and any text editor I run it through doesn't show any character at the beginning of the file, but when I pull it up in Visual Studio's debugger, I clearly see an empty box in front of the file.

Box in file

I also get the error:

Data at the root level is invalid. Line 1, position 1.

alt text

Anyone know what this is?

Update: Edited post to qualify type of file. It's an XSD file created by Microsoft's XSD creator.

Edit
Report

1 Answer

29

here's how you do it with vim:

# vim file.xml
:set nobomb
:wq
answered 2008-11-18T22:58:51.817

Your Answer