我有一个用UTF-8编码的XSD文件,我运行它的任何文本编辑器都没有在文件开头显示任何字符,但是当我在Visual Studio的调试器中提取它时,我清楚地看到一个空的文件前面的框.

我也得到错误:
根级别的数据无效.第1行,第1位.

有谁知道这是什么吗?
更新:编辑帖子以限定文件类型.这是由Microsoft的XSD创建者创建的XSD文件.
我正在使用第三方DLL,它通过互联网传输XML文档.
为什么DLL会抛出以下异常?
根级别的数据无效.第1行,第1位.(有关完整的异常文本,请参见下文.)
以下是XML文档的前几行:
<?xml version="1.0" encoding="utf-8"?> <REQUEST> <HEADER>
<REQUESTID>8a5f6d56-d56d-4b7b-b7bf-afcf89cd970d</REQUESTID>
<MESSAGETYPE>101</MESSAGETYPE>
<MESSAGEVERSION>3.0.2</MESSAGEVERSION>
Run Code Online (Sandbox Code Playgroud)
例外:
System.ApplicationException was caught
Message=Unexpected exception.
Source=FooSDK
StackTrace:
at FooSDK.RequestProcessor.Send(String SocketServerAddress, Int32 port)
at Foo.ExecuteRequest(Int32 messageID, IPayload payload, Provider prov)
at Foo.SendOrder(Int32 OrderNo)
InnerException: System.Xml.XmlException
LineNumber=1
LinePosition=1
Message=Data at the root level is invalid. Line 1, position 1.
Source=System.Xml
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.LoadXml(String xml) …Run Code Online (Sandbox Code Playgroud)