How eclipse closes XML file validation

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.