[Fatal Error] :3:13: Open quote is expected for attribute "{1}" associated with an element type "id".
用DOM解析XML时出现了如下错误:
[Fatal Error] :3:13: Open quote is expected for attribute "{1}" associated with an element type "id".
org.xml.sax.SAXParseException: Open quote is expected for attribute "{1}" associated with an element type "id".
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
at com.xml.DOMDemo.parseDomXML(DOMDemo.java:26)
at com.xml.DOMDemo.main(DOMDemo.java:14)
检查后发现我的xml文件是这样写的
<?xml version="1.0" encoding="UTF-8"?>
<message>
<person id=1>
<name>jerry</name>
<age>18</age>
<sex>男</sex>
</person>
<person id=2>
<name>Aimi</name>
<age>20</age>
<sex>女</sex>
</person>
</message>
错误就在于,xml元素的开始标签的属性必须用双引号括起来
改为:
<person id="1">
<person id="2">
[Fatal Error] :3:13: Open quote is expected for attribute "{1}" associated with an element type "id".的更多相关文章
- BUG:Open quote is expected for attribute "{1}" associated with an element type "id".
BUG原因:Mybatis的xml文件中id缺少双引号: 正确的应该是:
- Open quote is expected for attribute "property" associated with an element type "result".错误
java Mybatis 框架下的项目 报 Open quote is expected for attribute "property" associated with a ...
- Open quote is expected for attribute "{1}" associated with an element type "name".
xml属性必须用引号“”,不能缺少.
- Open quote is expected for attribute "{1}" associated with an element type "column".
这个的错误的意思很简单:就是自己的配置文件是否缺少""号
- ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer)
1.之前搭建的kafka,过了好久,去启动kafka,发现报如下下面的错误,有错误就要解决了. 然后参考:https://blog.csdn.net/hello_world_qwp/article/d ...
- 【VS开发】fatal error C1853: "Debug\sift.pch"预编译头文件来自编译器的早期版本
fatal error C1853: "Debug\sift.pch"预编译头文件来自编译器的早期版本 <pre id="best-content-12991040 ...
- Ubuntu 13.10 PHP 5.5.x mcrypt missing – Fatal Error: Undefined function mcrypt_encrypt()!
[原文]http://www.tuicool.com/articles/goto?id=myM7veR I had updgraded my Ubuntu from 13.04 to 13.10 la ...
- Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D
Fatal error: Allowed memory size of 524288000 bytes exhausted (tried to allocate 64 bytes) in D 从数据库 ...
- FATAL ERROR: Could not find ./bin/my_print_defaults的解决办法
对mysql数据库初始化过程中,会有如下报错信息: 1 2 3 4 5 6 7 [root@localhost scripts]# ./mysql_install_db --user=mysql FA ...
随机推荐
- 安卓hid驱动触摸屏
在kernel/drivers/hid/ 目录下三个文件中添加usbtouch的pid vid, 文件分别是hid-multitouch.c .hid-ids.h.hid-core.c 具体如何添加可 ...
- Bagging和Boosting的区别
转:http://www.cnblogs.com/liuwu265/p/4690486.html Bagging和Boosting都是将已有的分类或回归算法通过一定方式组合起来,形成一个性能更加强大的 ...
- 如何更改linux文件的拥有者及用户组(chown和chgrp)
http://blog.csdn.net/hudashi/article/details/7797393 一.基本知识 在Linux中,创建一个文件时,该文件的拥有者都是创建该文件的用户.该文件用 ...
- hdu 1059
题目大意:就是有价值1.2.3.4.5.6的硬币各多少个,然后让你判断能否把他们分成价值相等的两部分. 题目思路:目测dp,一看果然dp,完全背包,需要剪枝,硬币个数为容量,下标为value,用一个b ...
- bootstrap手风琴折叠
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <title> ...
- AngularJS 控制器 Live Dom
控制器的作用是在$scope对象上创建属性和方法,控制器的作用域是$scope,所以作用域是针对控制器来讲的.另外,控制器实例不是单例,每次都会重新实例化,不像服务是单例的. 其是注册在模块上的,如 ...
- socket粗解
百度定义:网络上的两个程序通过一个双向的通信连接实现数据的交换,这个连接的一端称为一个socket. Socket通信流程: 网络上的两个程序通过一个双向的通信连接实现数据的交换,这个连接的一端称为一 ...
- Spark技术的总结 以及同storm,Flink技术的对比
spark总结 1.Spark的特点: 高可伸缩性 高容错 基于内存计算 支持多种语言:java,scala,python,R 高质量的算法,比MapReduce快100倍 多种调度引擎:可以运行于Y ...
- netcore的NLog使用小记
1. 启动应用程序日志配置 修改Program.cs,在WebHostBuilder构建时配置日志 public static IWebHostBuilder CreateWebHostBuilder ...
- .NET Core下开源任务调度框架Hangfire的Api任务拓展(支持秒级任务)
HangFire的拓展和使用 看了很多博客,小白第一次写博客. 最近由于之前的任务调度框架总出现问题,因此想寻找一个替代品,之前使用的是Quartz.Net,这个框架方便之处就是支持cron表达式适合 ...