Thứ Ba, 24 tháng 9, 2013

How to fix Eclipse validation error “No grammar constraints (DTD or XML schema) detected for the document.”?

Eclipse is throwing an XML schema warning message in all xml file: “No grammar constraints (DTD or XML schema) detected for the document.”

answer:


I am not an expert but a learner. I accidentally found an easy and stupid way to solve the problem. What you just need to do is:
Press ctrl + shift + F (it's a shortcut to format the file in Eclipse)
If this does not solve the problem then press the TAB key at the starting of this particular line
?xml version="1.0" encoding="UTF-8"? and not anywhere else (I don't not why, but this works. If anyone here knows why I will be very happy to know)
Then press ctrl + shift + F and save.
The warning will be gone, at least for me, you may try for yourself...
--Madhavi--

Không có nhận xét nào:

Đăng nhận xét