Error on line 1 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
分析原因:
解析一个XML时引起次异常,可能是由于BOM引起的。
BOM:Byte Order Mark,中文名字节顺序标记。UCS规范建议在传输字节流前,先传输BOM来判断字节顺序。其实UTF-8是不需要用BOM来表明字节顺序的,但是可以 用BOM来表明编码方式。BOM的UTF-8编码是EF BB BF,所以呢,如果接受者收到EF BB BF开头的字节流,就说明它是UTF-8编码了。
解决办法:
可以用UltraEdit或者EmEditor打开XML,然后另存为,保存的时候有选项是以无BOM的UTF-8保存还是以有BOM的UTF-8保存。
本文转自:http://www.myexception.cn/xml-soap/678826.html
相关推荐
设置隐试打开PPT报错 Hiding the application window is not allowed
keil常见错误 keil常见错误 keil常见错误 keil常见错误
解决:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.
Host 主机名 is not allowed to connect the mysql server 原因:没有授权远程访问mysql 解决方法: cmd 中运行mysql -u root -p(如果报mysql 不是内部或外部命令,找到安装mysql对应的bin文件夹运行mysql.exe,...
nginx: [emerg] “proxy_cache_path” directive is not allowed here in /etc/nginx/conf.d/default.conf:29 提示意思“proxy_cache_path指令不被允许”,在官网上查找了相关说明,也没有发现问题,最后看应用范围...
在使用MySQL数据库时,可能会遇到"Host 'localhost' is not allowed to connect to this MySQL server"的错误信息,这是由于MySQL的安全机制所致。MySQL的安全机制是基于主机名和用户名的组合来控制访问权限的。因此...
keil 编译时出现错误和警告总结 中国电子DIY之家
algorithm2e.sty — package for algorithms 用于编辑算法伪代码等。
从3GPP协议和UE端行为分析5G gmm cause #27的网络问题
mongod高级查询语句,Javascript查询和$where查询,正则表达式匹配
directories that will not be allowed to be processed by Diskeeper. Event Logging ------------- Diskeeper records information about its activity in two ways. First, general information about ...
java.sql.SQLException: null, message from server: “Host ‘223.72.41.7’ is not allowed to connect to this MySQL server” 客户端访问时报错: 解决方法: 1,登陆服务器 mysql> use mysql; //用mysql ...
主要介绍了php采用curl访问域名返回405 method not allowed提示的解决方法,需要的朋友可以参考下
NULL 博文链接:https://rayoo.iteye.com/blog/1973032
Android WebView 报 Not allowed to load local resource错误的解决办法 博客地址:http://blog.csdn.net/yuzhiqiang_1993/article/details/76228541
解决SQLSERVER无法安装的问题,提示文件挂起的错误,通过该东东能彻底解决。
opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(51): error: a storage class is not allowed in an explicit specialization 这是由于NCVPixelOperations.hpp的问题,只要替换opencv-2.4.9/...
java.lang.UnsupportedOperationException: For security reasons, WebView is not allowed in privileged processes 因为应用是系统级别的,在AndroidManifest.xml中添加了android:sharedUserId=”android.uid....
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation;...
message from server: “Host ‘****’ is not allowed to connect to this MySQL server 1:在登录mysql服务器 2:执行:GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ WITH GRANT OPTION //赋予任何主机访问数据的...