How to fix Eclipse validation error quot;No grammar constraints detected for the documentquot;?(如何修复 Eclipse 验证错误“未检测到文档的语法约束?)
问题描述
Eclipse 3.5.2 抛出 XML 模式警告消息:
Eclipse 3.5.2 is throwing an XML schema warning message:
No grammar constraints (DTD or XML schema) detected for the document.
application.xml 文件:
The application.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
</application>
我不想禁用警告.如何让 Eclipse 正确验证 XML 文档?
I do not want to disable the warning. How can I get Eclipse to correctly validate the XML document?
推荐答案
不知道你是否满意地解决了这个问题,但我今天在使用 Eclipse 3.6 中的一些 Spring 配置文件时遇到了这个帖子.无论如何,我都无法让错误在 Eclipse 的问题"视图中消失,直到我右键单击该问题并将其删除.
Not sure if you ever resolved this satisfactorily but I ran across this posting today while working with some Spring configuration files in Eclipse 3.6. I could not get the error to go away in the Problems view in Eclipse no matter what, until I right-clicked on the problem and deleted it.
我认为如果我重新验证并且确实存在问题,它会回来,但到目前为止还没有.问题是我有一个几乎相同的 Spring 配置文件,但没有显示错误.
I figured it would come back if I revalidated and there was actually a problem and so far it hasn't. The thing is I had an almost identical Spring config file that wasn't showing the error.
似乎有时某些东西会卡在 Eclipse 中.不知道为什么,但是在这与文件与编辑器不同步并且不得不强制刷新之间,我想我必须接受它.
It would seem that sometimes stuff just gets stuck in Eclipse. Not sure why but between this and files getting out of sync with the editors and having to force a refresh I guess I have to accept it.
这篇关于如何修复 Eclipse 验证错误“未检测到文档的语法约束"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何修复 Eclipse 验证错误“未检测到文档的语法
基础教程推荐
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 降序排序:Java Map 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01