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
Download from your IP address is not allowed 百度网盘永久连接: QT下载: qt-opensource-linux-x64-5.8.0.run: 链接:https://pan.baidu.com/s/1sQ3tqPaWdDnmhBYAc_XR7g qt-opensource-linux-x64-5.13.1....
### Keil 编译器常见错误解析与解决方案 #### 一、Warning 280: ‘i’: unreferenced local variable **问题描述**:在编译过程中出现警告信息“Warning280: ’i’: unreferenced local variable”,表明在函数内部...
解决:com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.
document.write is not allowed in a script tag(解决方案).md
document.write is not allowed in a link tag(解决方案).md
document.write is not allowed in a style tag(解决方案).md
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指令不被允许”,在官网上查找了相关说明,也没有发现问题,最后看应用范围...
import cycle not allowed(解决方案).md
在使用MySQL数据库时,可能会遇到"Host 'localhost' is not allowed to connect to this MySQL server"的错误信息,这是由于MySQL的安全机制所致。MySQL的安全机制是基于主机名和用户名的组合来控制访问权限的。因此...
标题中的"NR5G网络拒绝码-5gmm_cause = 27 (0x1b) (N1 mode not allowed)"是指5G NR(New Radio)网络在服务请求或去注册请求过程中遇到的一种特定错误情况。这个拒绝码是5G移动管理(5GMM)中的一个原因值,用来...
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 ...
本文将详细介绍在使用curl访问特定域名时遇到405 Method Not Allowed错误的解决方法。首先,我们先来理解什么是405错误以及其背后可能的原因。 HTTP状态码405 Method Not Allowed表示客户端请求的HTTP方法不被...
标题 "Host 'localhost' Not Allowed To Connect To Server" 是一个常见的MySQL服务器错误,通常发生在尝试从本地主机连接到数据库服务时被拒绝的情况。这个错误意味着MySQL服务器的配置没有正确地允许来自localhost...
CreateInstanceFromType is not allowed to be called from a ScriptableObject constructor (or instance field initializer), call it in OnEnable instead. Called from ScriptableObject '...
Android WebView 报 Not allowed to load local resource错误的解决办法 博客地址:http://blog.csdn.net/yuzhiqiang_1993/article/details/76228541