`
hoary20
  • 浏览: 136731 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

XML出现警告信息

阅读更多
Eclipse里的No grammar constraints (DTD or XML schema) detected for the document警告是什么意思?

警告信息,没什么大问题的,一般IDE环境中配置档的最前面都是DTD 或 XML 打头的。
比如
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

dtd验证是xml的规范,要去除警告的话:工具栏:
windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:下拉框选择Ignore即可。

其他的非XML警告:
添加@SuppressWarnings("unchecked") 
可以在eclipse的Window->Preferences->Java->Compiler->Errors/Warning->Generic types中将Unchecked generic type operation设置为Ignore。

可以在eclipse的Window->Preferences->Java->Compiler将Compiler compliance level 设置为小于5.0的级别。
分享到:
评论
4 楼 love_wbo 2013-06-08  
myeclipse中的XML中没找到XML file,是怎么回事?
3 楼 南京玄武 2013-02-28  
ah孙玉红 写道
windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:下拉框选择Ignore即可。


我的myeclipse 里没有windows => preferences => xml 中的xml 为什么?


MyEclipse 8.5

windows => preferences => MyEclipse => Files And Editors => xml

2 楼 南京玄武 2013-02-28  
ah孙玉红 写道
windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:下拉框选择Ignore即可。


我的myeclipse 里没有windows => preferences => xml 中的xml 为什么?


MyEclipse 8.5

windows => preferences => MyEclipse => Files And Editors => xml

1 楼 ah孙玉红 2012-05-15  
windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:下拉框选择Ignore即可。


我的myeclipse 里没有windows => preferences => xml 中的xml 为什么?

相关推荐

Global site tag (gtag.js) - Google Analytics