score:182
You have two options:
Configure Workspace Settings (disable the validation for the current workspace): Go to Window > Preferences > Validation and uncheck the manual and build for: XML Schema Validator, XML Validator
Check enable project specific settings (disable the validation for this project): Right-click on the project, select Properties > Validation and uncheck the manual and build for: XML Schema Validator, XML Validator
Right-click on the project and select Validate to make the errors disappear.
score:1
In JBoss Developer 4.0 and above (Eclipse-based), this is a tad easier. Just right-click on your file or folder that contains xml-based files, choose "Exclude Validation", then click "Yes" to confirm. Then right-click the same files/folder again and click on "Validate", which will remove the errors with a confirmation.
score:8
Ensure your encoding is correct for all of your files, this can sometimes happen if you have the encoding wrong for your file or the wrong encoding in your XML header.
So, if I have the following NewFile.xml:
<?xml version="1.0" encoding="UTF-16"?>
<bar foo="foiré" />
And the eclipse encoding is UTF-8:
The encoding of your file, the defined encoding in Eclipse (through Properties->Resource) and the declared encoding in the XML document all need to agree.
The validator is attempting to read the file, expecting <?xml ... but because the encoding is different from that expected, it's not finding it. Hence the error: Content is not allowed in prolog. The prolog is the bit before the <?xml declaration.
EDIT: Sorry, didn't realise that the .xml files were generated and actually contain javascript.
When you suspend the validators, the error messages that you've generated don't go away. To get them to go away, you have to manually delete them.
- Suspend the validators
- Click on the 'Content is not allowed in prolog' message, right click and delete. You can select multiple ones, or all of them.
- Do a Project->Clean. The messages should not come back.
I think that because you've suspended the validators, Eclipse doesn't realise it has to delete the old error messages which came from the validators.
score:50
Window > Preferences > Validation > uncheck XML Validator Manual and Build
score:64
The other answers may work for you, but they did not cover my case. I wanted some XML to be validated, and others not. This image shows how to exclude certain folders (or files) for XML validation.
Begin by right clicking the root of your Eclipse project. Select the last item: Properties...
(If your browser scales this image very small, right click and open in a new window or tab.)
- Eclipse appears to be very sensitive if you click the **Browse File...* or **Browser Folder...* button. This dialog needs some work!
- This was done using Eclipse 4.3 (Kepler).
Source: stackoverflow.com
Related Query
- Disable XML validation in Eclipse
- How to disable the JSP validation in Eclipse helios?
- Eclipse kepler - Disable javascript validation
- Eclipse how to disable validation for txt file (lsp4e)
- eclipse disable completion of xml comment
- How can I disable HTML validation for PHP files in Eclipse Juno 4.2.1?
- Eclipse proxy setting for XML validation
- How to disable APT web service validation in Eclipse 4.4 edition for JavaEE Developers
- XML validation by XSLT or Schematron in Eclipse XML Editor?
- Seems impossible to disable JavaScript validation in eclipse
- How can one disable the XML editor in Eclipse for .xsd and related files?
- Eclipse xml validation
- How to disable Eclipse HTML validation via M2E
- eclIpse 3.7 disable DTD validation (validation *of DTDs*)
- XML validation and auto-complete in Eclipse
- Disable tool tips of XML files in Eclipse
- Disable generics validation in Eclipse via M2E
- Eclipse gradle project's spring xml validation
- Eclipse : how to disable validation for SVG files
- Eclipse plugin: Disable context menu contributon if no xml is selected
- How do I disable validation of Javascript in <script> tags in JSPs ...in Eclipse
- Eclipse Kepler XML validation
- Eclipse Validation not picking up any errors in XML file? How do I check XML?
- Eclipse RCP: Disable Menu Entry for Command via Plugin XML
- Disable part of validation (annotations) in PHP Eclipse Photon
- Xml validation Error Eclipse Crash Deployment of App
- Eclipse: how to disable XML validation for a specific test-file?
- Eclipse extension point for excluding faceted projects from XML validation
- Eclipse Hibernate XML Editor: Property tag validation
- XML Validation in Eclipse
More Query from same tag
- Eclipse Window Builder VS Netbeans GUI Builder
- Spring MVC Annotations
- Managing lots of Apps
- Lua os.execute() does not work
- The constructor Adapter_PagerAdapter(FragmentManager, List<Fragment>) is undefined
- eclipse to use g++-4.exe not g++.exe
- How to hide android keyboard's input field
- installing swtChart RCP/SWT- java.lang.ClassNotFoundException: org.swtchart.Chart
- Error "the currently displayed page contains invalid values" in Eclipse
- Program runs in Eclipse but running jar does not run
- Can't seem to get my list view to open from a button
- How to properly set spring context on javaFX with spring?
- Eclipse Open Type: Restrict to open project
- Unknown cause of exception
- Keystore for Android app
- Eclipse PDE headless builds modifies source dirs and MANIFEST.MF
- Grid view gallery reading from SD card
- Websphere on Eclipse 4.19.0
- Failed to run com.android.ide.eclipse.adt.internal.build.AidlProcessor
- Android resource IDs suddenly not final, switch()'es broken
- Start a Hadoop Map Reduce Job on a remote cluster in Eclipse with the run dialog (F11)
- Project "MyProject" has higher compiler option than running Eclipse
- How to use Gradle to generate Eclipse and Intellij project files for Android projects
- android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.GET_CONTENT
- ClassNotFoundException - when running ant-junit
- How to add key listener to a view in Eclipse?
- Missing Quick-Fix solutions in Eclipse
- Surround selection with method call
- Where i can find Php.ini file in eclipse
- Develop and Debug Python with Remote Server