当eclipse的xml文件经常会弹出No grammar constraints (DTD or XML schema) detected for the document警告,看字面意思是没有xml文件的规范DTD验证,不知道怎么添加DTD或XML schema,那就只能掩耳盗铃吧,把这个警告忽略过去,方法:
在eclipse菜单中配置:
windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:下拉框选择Ignore即可。