Eclipse 3.5.2 is throwing an XML schema warning message:
No grammar constraints (DTD or XML schema) detected for the document.
The applica
Putting this at the top of any offending file works for me:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE project>
for me it worked like a charm when I cut it (ctrl a + ctrl - X) and saved it back again (ctrl-s) ! the warning "No grammar constraints (DTD or XML schema) detected for the document" was gone for good!!
Non of the above mentioned solutions worked. It was working for Spring boot version 2.1.0.RELEASE but when i created project with spring boot version 2.3.0.RELEASE, i started getting
no grammar constraints (dtd or xml schema) referenced in the document issue.
I fixed it by updating Eclipse version which updates maven version as well. In my case i am using red hat developer studio so, Menu->Help->check for updates, It will scan and open the update window with Available updates. Check the update related to Eclipse version and Click Next->Next->Accept Terms->Finish.
I was just having this problem last night (using eclipse V.kepler). I am completely new to java and eclipse and I am trying to teach myself how to make an android app. While I was working on the lessons offered at developers.android.com I had input this into my main_activity_actions.xml file:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Search should appear as an action button -->
<item android:id="@+id/action_search"
android:icon="@drawable/ic_action_search"
android:title="@string/action_search"
android:showAsAction="ifRoom"/>
</menu>
This gave me the same error as OP. I tried following the suggestion of adding
<!DOCTYPE project>
just below the first line and it solved the issue.
If this warning shows up it means the XML Validate function (which is different from the XML instance editor!) did not know what DTD or XSD to apply. This of course also means it did not actually check if the XML instance was compliant to any schema.
This is therefore a helpful warning, it should not be turned off (if you use the Validate menu function and expect it to do something).
You can use the preferences to make your schema known:
Some public idenditfiers and schema locations are already contained in the "Plugin Specified Entries" (especially if you have WSTP installed). For those namespaces you do not get the warning (As it uses the system provided copy to validate).
Add this to your xml file's very beginning:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE RelativeLayout>
Change RelativeLayout to your defined root layout ,then find xml file in left side, in layout folder, right click and select Validate.