what causes eclipse to check (or not check) xml files [message #986337] |
Tue, 20 November 2012 02:03  |
Eclipse User |
|
|
|
I have two versions of the same project (in eclipse 3.5). In one project part of the java source is in a library, which makes testing difficult. So I created a second version of the same Dynamic Web project, where all the source is included.
Both projects have identical xml files in their data part in WebContent. In the library version of the project eclipse complains about some xml files with: "The markup in the document following the root element must be well-formed" because it does not have a root node. Something we may have to fix.
But to my surprise in the non-library version of the project the same file is present, and here eclipse does NOT complain. How can that be?
Both projects use the workspace settings, so no project specific settings. I compared many settings, but they are all identical. The files have no xml-schema.
Does anybody have a clue?
|
|
|
|
|
|
|
|
Re: what causes eclipse to check (or not check) xml files [message #1012343 is a reply to message #986668] |
Thu, 21 February 2013 06:36  |
Eclipse User |
|
|
|
I finally found the solution myself.
I thought both projects were identical, but that was not exactly true.
In examining the .project files, I found that the project that showed the xml errors had
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
and the other project had not. After searching the internet for validationbuilder I found that this is indeed the xml checker.
Having it present in the .profile, forces all xml files to be validated after each build and/or change, causing a red cross on the faulty files.
In the other project, the same files had the same errors, and when 'validate' was done manually on such a file, the file would show the same error. But it would not automatically show after each build.
Removing this buildcommand from the .project, does not remove the red crosses, because they have already been detected. They can only be cleared by fixing the error and running validate manually.
An alternative is to remove from the workspace the file:
.metadata\.plugins\org.eclipse.core.resources\.projects\myproject\.markers
This will reset all red crosses, until the next explicit validation.
|
|
|
Powered by
FUDForum. Page generated in 0.08968 seconds