[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 ...
随机推荐
- 6-具体学习git--分支冲突,rebase|| stash 临时修改
rebase很危险. https://morvanzhou.github.io/tutorials/others/git/
- tinyweb集成springmvc 的一种可行方式
最近tiny项目中集成了springmvc,而且使用的tiny的版本比较低,所以整合起来官网给的前两种方式都行不通. 而且有个tiny整合springmvc的maven依赖都下载不了.所以只有使用第三 ...
- Android 全局搜索条写成自定义控件-曹永思
图文: 1.Android 自定义控件的布局文件 2.编写Android 自定义控件的要处理的逻辑代码(曹永思) 3.在调用自定义控件的 Activity的布局文件中调用Android 称之为控件,控 ...
- java使用filter设置跨域访问
import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import ja ...
- 20155205 《Java程序设计》实验四 Android程序设计
20155205 <Java程序设计>实验四 Android程序设计 一.实验内容及步骤 (一) Android Stuidio的安装测试 参考<Java和Android开发学习指南 ...
- C++标准库addressof的应用
C++11将addressof作为标准库的一部分,用于取变量和函数等内存地址. 代码示例: #include <memory> #include <stdio.h> void ...
- forward请求转发,param参数传递以及request.getParameter图文讲解
<%@ page language="java" contentType="text/html;charset=utf-8" pageEncoding=& ...
- 冲刺博客NO.1
今天小组开了一个会议来对APP进行模块分析,从客户需求 隐私问题到 界面设计大致定了一个方向并分工. 做的内容:对自己负责的模块进行了粗略的划分和认识,学会了如何页面跳转. 我负责的是登录界面,主界 ...
- scikit-FEM-例1-求解Possion边值问题
""" Author: kinnala Solve the problem -∇²u = 1 with zero boundary conditions on a uni ...
- HDU 4920 矩阵乘积 优化
Matrix multiplication Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/ ...