Today, I tried the eclipse writing XML file, which uses a DTD constraint, and then writes the XML content, but finds it seems that eclipse did not check the XML file according to the DTD constraints, that is, the XML file was written incorrectly and not prompted.
Experiment for a long time, found that the right key has a "Validate" option to verify the XML file, but each save after the manual right key point "Validate", too troublesome ...
Have to find a solution, Chinese search does not seem to be found, we have not encountered this problem ...
Or use English search point, a lot of problems in Chinese can not be found.
Search "How to validate XML in Eclispe", a search found that Elipse official website has a solution.
URL: http://www.eclipse.org/webtools/community/tutorials/XMLValidation/XMLValidationTutorial.html
The solution is:
Select project then right button-> Select Properties
Put a picture of the official website:
After the end point is OK, the save XML file is automatically validated ...