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 ...
随机推荐
- java交换两个参数值的四种方法
第一种:添加中间变量,算是最经典最简易的一种了. //添加一个中间变量 int x = 1, y = 2; int z; z = x;x = y;y = z; System.out.println(x ...
- Docker 搭建 GitLab
Docker 搭建 GitLab 步骤 # 创建目录 mkdir -p /usr/local/gitlab && cd /usr/local/gitlab # 创建映射目录 mkdir ...
- C#LeetCode刷题之#58-最后一个单词的长度(Length of Last Word)
问题 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/3927 访问. 给定一个仅包含大小写字母和空格 ' ' 的字符串, ...
- python处理转载博客html
前景 在转载别人博客的时候通常我们会通过复制html然后放到编辑器里面, 但是通常html里有很多杂七杂八的东西, 比如script, svg这些标签导致排版出现问题 例如由lu标签引起的 由svg标 ...
- Linux下如何高效切换目录?
Linux 下对于目录的切换,大家肯定会想到一个命令:cd 命令.这个是 Linux 下再基本不过的命令,如果这个命令都不知道的话,赶紧剖腹自尽去吧. cd 命令确实很方便,但如果需要频繁在下面的目录 ...
- CODING DevOps 代码质量实战系列最后一课,周四发车
随着 ToB(企业服务)的兴起和 ToC(消费互联网)产品进入成熟期,线上故障带来的损失越来越大,代码质量越来越重要,而「质量内建」正是 DevOps 核心理念之一. <DevOps 代码质量实 ...
- CODING DevOps 微服务项目实战系列第二课来啦!
近年来,工程项目的结构越来越复杂,需要接入合适的持续集成流水线形式,才能满足更多变的需求,那么如何优雅地使用 CI 能力提升生产效率呢?CODING DevOps 微服务项目实战系列第二课 <D ...
- SpringBoot 集成SpringSecurity JWT
目录 1. 简介 1.1 SpringSecurity 1.2 OAuth2 1.3 JWT 2. SpringBoot 集成 SpringSecurity 2.1 导入Spring Security ...
- Cannot instantiate the type ......的解决
使用public abstract class MainWindow implements ActionListener{} 之后创建对象MainWindow window = new MainWin ...
- linux驱动之定时器的使用
被文章摘自一下几位网友.非常感谢他们. http://blog.sina.com.cn/s/blog_57330c3401011cq3.html Linux的内核中定义了一个定时器的结构: #incl ...