I have an eclipse
dynamic web Project, this warning appear in all XML
files;
No grammar constraints (DTD or XML Schema) referenced in the document.
how can i solve it ?
To resolve an error whose message is "No DTD or schema referenced in document", perhaps the simplest approach would be to reference the relevant DTD or schema from the document. That involves (a) having a DTD or XSD schema for each document type you are using, (b) knowing where they are, and (c) adding the appropriate reference to the document, or supplying the relevant information elsewhere in the Eclipse configuration. Your question provides no clue as to which of these you are finding hard or confusing.
Or possibly you merely want to change some option in Eclipse to make it stop expecting that there will be a DTD or schema -- it would be surprising to me if Eclipse required that there be a schema for every bit of XML it is asked to handle, so it looks off hand as if something in your setup was asking Eclipse not just to work with the XML but to validate it.
Error on line 1:No Grammer Conctraints(DTD or XML Schema)referenced in the document. I fixed it by adding:
<!DOCTYPE xml>
as the second line in XML file which means:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
After Adding the second line Rt.click on testng.xml file if you see this only one option such as 1.XLS transformation.
Options I have when I Rt.click on testNG.xml file : 1.XLS Transformation
Then Follow these steps:
How I Resolved:
<!DOCTYPE ehcache>
on line 2. – Kir Kanos