cvc-complex-type.4: Attribute ‘version’ must appear on element ‘web-app’.
来源:互联网 发布:2017程序员笔记本选择 编辑:程序博客网 时间:2024/05/04 10:39
XML的编写是否符合规范,可以通过XML Schema或DTD进行验证,但有时候电脑本来就很卡,而且XML的某些错误并未导致程序无法运行的情况下,暂时关闭XML的验证也算不错的选择。
如web.xml中web-app标签没指定version:
<web-app xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://java.sun.com/xml/ns/j2ee” xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd” id=”WebApp_ID” >
这时,就会出现打红叉,提示:cvc-complex-type.4: Attribute ‘version’ must appear on element ‘web-app’.
这个错误并未导致程序无法运行,而eclipse关闭XML验证的方法如下:
1.菜单【Windows】 -【Preperences】-【Validation】
2.在右边找到“XML Validator”,把取消【Bulid】复选框的选中状态,保持【Manual】 的选中状态,因为我们最后还需要确保XML的正确性,这个可以通过选择XML文件,在右键菜单中选择【Validate】手工来验证,如果XML有错,会弹出窗口提示,但如果把【Manual】复选框也取消的话,再手工验证,即使XML真有错,也不会正确提示。
- cvc-complex-type.4: Attribute ‘version’ must appear on element ‘web-app’.
- Java--cvc-complex-type.4:Attribut ‘version’ must appear on element ‘web-app’
- cvc-complex-type.3.2.2: Attribute 'singleton' is not allowed to appear in element 'bean'
- cvc-complex-type.3.2.2: Attribute 'singleton' is not allowed to appear in element 'bean
- - cvc-complex-type.2.3: Element 'web-app' cannot have character
- cvc-complex-type.2.3: Element 'web-app' cannot have character
- cvc-complex-type.2.3: Element 'web-app' cannot have character [children], because the type's content
- java web.xml报错cvc-complex-type.2.3: Element 'web-app' cannot have character [children]
- 兔子-cvc-complex-type.2.3: Element 'web-app' cannot have character [children], because the type's cont
- java web.xml 报错cvc-complex-type.2.3: Element 'web-app' cannot have character [children], because the
- cvc-complex-type.2.1: Element 'mvc:annotation-driven' must have no character or element information
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'attribute'. One of '{"http:
- SAXParseException: cvc-complex-type.3.2.2&&Document root element "beans", must match DOCTYPE root "null"
- web.xml中的web-app中出现Attribute "xsi:schemaLocation" must be declared for element type "web-app".
- spring mvc web.xml 配置出现 Attribute "xmlns:xsi" must be declared for element type "web-app"
- cvc-complex-type.2.3: Element 'beans' cannot have character [children]
- cvc-complex-type.2.3: Element 'beans' cannot have character [children]
- web项目web.xml出现cvc-complex-type.2.4.a: Invalid content was found starting with element
- 随笔知识小记
- Linux好书、经典书籍推荐
- 点滴贵于金
- 关于基础,不得不说
- Oracle表空间
- cvc-complex-type.4: Attribute ‘version’ must appear on element ‘web-app’.
- 返回值为引用或指针的成员函数加const要注意
- 系统调用跟我学
- 如何在SQL2005中循环添加列
- 【系统收藏】硬盘故障有哪些征兆
- 第九章 关系映射 多对多关联映射
- 简单记录,多级列表的实现。
- MyEclipse启动报错解决 exit code
- 屌丝高考五周年纪念日第一篇