今天使用eclipse后,看到xml中的警告图标,提示:No grammar constraints (DTD or XML Schema) referenced in the document. 异常,按照网上推荐的方法在xml中加入了dtd描述:
方法一:常用方法 关闭XML验证 工具栏:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore即可。 方法二:(个人推荐) 添加 内容如下 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/2002/xmlspec/dtd/2.10/xmlspec.dtd">
结果,在使用Junit测试代码进行测试时,每次都停在读取xml文件【Document document = reader.read(read);】的地方很长时间。
in = new ByteArrayInputStream(result.getBytes()); SAXReader reader = new SAXReader(); Reader read = new InputStreamReader(in,"UTF-8"); Document document = reader.read(read); return document.getRootElement();
查了N多资料都快把我逼疯了。回来在logback日志框架怀疑的时候,有个提示说xml的内容不规范,突然想到通过去掉DTD描述进行测试。结果读取文件正常了。
看来使用Dom4J将字符串转换为Document的时候,对于不规范的内容,会导致读取转换超时,可惜又不报个错,害我找半天。
还是应了那句话,不作死就不会死。像我这种有强迫症的人,得到的是多么痛的领悟,半天时候又耗费了。今天又要加班了!
相关推荐
1、jdk6 spket1.6.23 ...3、出现 No grammar constraints (DTD or XML schema) detected for the document. -> xml files => validation => Indicate when no grammar is specified:下拉框选择Ignore即可。
You see the grammar concept in action, guaranteeing you will remember it next time you need to use it in writing or in conversation. Learning grammar has never been so easy! Table of contents 1. ...
This book and audio compact disc program instructs students of English as a second language in the elements of grammar, presenting a grammar review that emphasizes speech and correct pronunciation....
The grammar is embodied in a simple And–Or graph representation where each Or-node points to alternative sub-configurations and an And-node is decomposed into a number of components. This ...
the grammar of C#
Oxford Practice Grammar ADVANCED
English Grammar Today.iso English Grammar Today 下载 English Grammar Today.iso English Grammar Today 下载
Collins+Cobuild+English+Grammar.pdf
a grammar system for shape construction
Better Grammar in 30 Minutes a Day.doc
Grammar Kills Your English Speaking “How You Will Speak Excellent English In 6 Months Or Less” Dear Friend, Do you feel embarrassed when you speak English? Is your pronunciation bad? Do you make a ...
English grammar today : an A-Z of spoken and written grammar Author: Ronald Carter ISBN : 0521731755 (Student book with CD-ROM) ISBN : 9780521731751 (Student book with CD-ROM) 该随书光驱实际上是...
Essential_Grammar_in_Use_3rd_ed[RaymondMurphy].djvu 英文第二版扫描彩色清晰版 djvu格式 使用windjview工具查看(http://windjview.sourceforge.net/) --------- 它专为非英语国家英语学习者编写,在结构上,...
English Grammar - IELTS 2002 Handboo
The Grammar of Graphics可视化图形语法 书籍下载
in turn, become enshrined in grammar books directed at teachers and students The misrepresentation of English grammar gives a false view of the language, perpetuates inaccurate 'rules', and results ...
Oxford Modern English Grammar ,Department of English Language and Literature University College London
This appendix contains XML reference material. It is divided into three main parts: 1. XML BNF Grammar 2. Well-Formedness Constraints 3. Validity Constraints
English Grammar in Use 3rd Edition (4 of 5)