Why “Data at the root level is invalid. Line 1, position 1.” for XML Document?

前端 未结 5 608
暗喜
暗喜 2020-11-30 08:34

I am using a third-party DLL which transmits an XML document over the internet.

Why would the DLL be throwing the following exception?

Data at

5条回答
  •  佛祖请我去吃肉
    2020-11-30 09:10

    I can give you two advices:

    1. It seems you are using "LoadXml" instead of "Load" method. In some cases, it helps me.
    2. You have an encoding problem. Could you check the encoding of the XML file and write it?

提交回复
热议问题