XML is written to conform to specifications, can be verified by XML Schema or DTD, but sometimes the computer is very card, and some of the XML errors do not cause the program can not run, the temporary shutdown of XML validation is also a good choice.
If the Web-app tag in Web. XML does not specify 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" >
At this point, a red fork appears, prompting: Cvc-complex-type.4:attribute ' version ' must appear on element ' Web-app '.
This error does not cause the program to run, and Eclipse turns off XML validation in the following way:
1. Menu "Windows"-"preperences"-"Validation"
2. Find "XML Validator" on the right, and leave the "Bulid" checkbox unchecked, keeping "Manual" selected, as we finally need to ensure the correctness of the XML, which can be selected by selecting the XML file and selecting "Validate" in the right-click menu. Manual to verify, if the XML is wrong, will pop-up window prompt, but if the "Manual" check box is also canceled, and then manually verify, even if the XML is really wrong, it will not be correctly prompted. 、
How eclipse closes XML file validation