1.Eclipse Unresolved Scenarios
When editing an XML file in Eclipse, it is possible for code to automatically prompt because a DTD file (document type definition) is introduced in the XML header, and Eclipse is the function of code hinting by parsing the DTD file.
But this DTD file is connected to the extranet via the network, for example, struts is connected to the Apache website.
If you are in a closed network environment (you cannot sisu the network), or if the DTD you are connecting to has the following error
At this point, eclipse cannot parse the DTD file, and the code hints are not available.
2. Workaround
Add the appropriate DTD file in the eclipse's XML directory
In the Eclipse menu, open Windows->preferences->xml->xml Catalog, as shown below, click the Add button
Location Select the DTD file you want to prompt
As for where the DTD is obtained, it is generally contained in the relevant jar package, such as struts is in the jar package root directory, the file is extracted from the line
When you add an XML catalog element, the code hint appears when you press the shortcut key back in the XML editor.
Code hints for Eclipse editing XML files