org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed(转)
xml文件不能被正确解析/The processing instruction target matching "[xX][mM][lL]" is not allowed.
The processing instruction target matching "[xX][mM][lL]" is not allowed.
Exception:org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
这个异常解释为:xml文件不能被解析,一般出现这样的问题在于xml格式上,并且问题多出现在xml文件的头部。我就是出现了这个问题。昨天还可以正常运行的,今天来了就运行不了了,很奇怪,查看了下错误信息,找到了原因。这是因为我的xml文件头部有两行空行,第三行才开始写
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
的。
总结:<?xml version="1.0" encoding="UTF-8"?>前面不要有任何其他字符,如空格、回车、换行这些否则就会出现上面的异常。
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed(转)的更多相关文章
- web.xml文件报错:The processing instruction target matching "[xX][mM][lL]" is not allowed.
昨晚把我的项目上传到了gitlab,然后今天在公司从gitlab下载下来, 发现web.xml报错.
- 关于解决 The processing instruction target matching "[xX][mM][lL]" is not allowed
在处理和保存XML文件时,出现The processing instruction target matching "[xX][mM][lL]" is not allowed 错误 ...
- (转)ERROR : The processing instruction target matching "[xX][mM][lL]" is not allowed.
现象:ERROR : The processing instruction target matching "[xX][mM][lL]" is not allowed. 异常解 ...
- Android报错:The processing instruction target matching "[xX][mM][lL]" is not allowed.
报错!!! The processing instruction target matching "[xX][mM][lL]" is not allowed. Attention! ...
- The processing instruction target matching ''[xX][mM][lL]" is not allowed
报错的来源是: <?xml version="1.0" encoding="UTF8"?> 解决方案::,一般是WSDL的头文件的格式出了问题,比如 ...
- 出现 The processing instruction target matching "[xX][mM][lL]" is not allowed错误
错误原因与解决办法: 这个错误的原因是因为xml的开始有多余的空格造成的,只要把多余的空格删除就没有问题了. xml开始部分写注释也会出现此问题. 本文出自:艺意
- The processing instruction target matching "[xX][mM][lL]" is not allowed.
现象: ERROR : The processing instruction target matching "[xX][mM][lL]" is not allowed. 异 ...
- dom4j解析xml报错:Nested exception: org.xml.sax.SAXParseException: White space is required between the processing instruction target and data.
采用dom4j方式解析string类型的xml xml: String string="<?xmlversion=\"1.0\" encoding=\ ...
- IDEA运行TestNG报错rg.testng.TestNGException: org.xml.sax.SAXParseException;
从eclipse复制的依赖注解,一运行测试脚本发现报错如下: "F:\Program Files\Java\jdk1.7.0_17\bin\java" -ea -Didea.lau ...
随机推荐
- 网络安全传输系统-sprint2线程池技术优化
part1:线程池工作原理 为满足多客户端可同时登陆的要求,服务器端必须实现并发工作方式.当服务器主进程持续等待客户端连接时,每连接上一个客户端都需一个单独的进程或线程处理客户端的任务.但考虑到多进程 ...
- QString字符串的查找与截取实例
QString是Qt中封装的字符串类,相对于标准库里的string,使用方法有些不同,个人感觉使用qt习惯后,感觉QString更好用,下面的代码主要是针对QString的字符查找.截取做的测试: # ...
- 13、Java 异常处理
1.简介 什么是异常?程序运行时,发生的不被期望的事件,它阻止了程序按照程序员的预期正常执行,这就是异常.异常发生时,是任程序自生自灭,立刻退出终止.在Java中即,Java在编译或运行或者运行过程中 ...
- Docker 搭建 SonarQube
Docker 搭建 SonarQube Docker 搭建 SonarQube 步骤 创建项目目录 mkdir -p /usr/local/sonarqube && cd /usr/l ...
- Springboot日志LOGO改变和设计
每次启动Springboot的时候,SpringBoot都会打印一个LOGO,那么这个LOGO是可以关闭和改变的. 1.关闭Springboot的LOGO 2.改变Springboot的日志LOGO ...
- C#LeetCode刷题之#501-二叉搜索树中的众数(Find Mode in Binary Search Tree)
问题 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/4086 访问. 给定一个有相同值的二叉搜索树(BST),找出 BS ...
- C#LeetCode刷题之#118-杨辉三角(Pascal‘s Triangle)
问题 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/3688 访问. 给定一个非负整数 numRows,生成杨辉三角的前 ...
- noip复习——快速幂
\(a ^ n \bmod p\) \(a, p, n \leq 10^9\) 最普通的二进制拆分 #define LL long long LL qpow(LL a, LL n, LL p) { L ...
- day12 异常 模块 单例
1.异常 处理 在程序执行过程中 ,发生,影响程序的正常运行 在python中 异常就是一个错误 try .... except....捕获异常 try 用来检测t ...
- 还不会springboot,阿里p8大牛一份385页pdf直接甩在脸上,给我啃
第一章 Java EE简介 Java EE 有相应的规范实现,包括但不限于: Web 支持 事务支持 消息服务 数据库持久层 Container JWS JAX-RS JNDI JAXP/JAXB J ...