How to fix Eclipse validation error “No grammar constraints detected for the document”?

后端 未结 18 748
礼貌的吻别
礼貌的吻别 2020-12-24 05:01

Eclipse 3.5.2 is throwing an XML schema warning message:

No grammar constraints (DTD or XML schema) detected for the document.

The applica

18条回答
  •  被撕碎了的回忆
    2020-12-24 05:21

    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...

提交回复
热议问题