1. Open MyEclipse, find the menu bar "window"----> "Preferences (Preferences)";
2. In the left navigation menu bar, find "myeclipse"----> "Files and Editors"----> "xml"---> "xml Catalog";
3, in the right interface, select "User Specified Entries", click on the right "Add ...";
4. Click "File System ..." in the pop-up "add XML Catalog Element" dialog box to add the path of the DTD file to the location input box, or click "Workspace". Add the path of the DTD file for the location input box;
5. Open the DTD file using a text editor and find the appropriate <! DOCTYPE ...> Document type declaration,
For example hibernate configuration file: Hibernate.cfg.xml The required DTD file is:
Hibernate-configuration-3.0.dtd
After opening hibernate-configuration-3.0.dtd, find the following:
<! DOCTYPE hibernate-configuration Public
"-//hibernate/hibernate Configuration DTD 3.0//en"
"Http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >
6. "Key type:" On the right drop-down box (there are three types: public Id,system Id,uri),
According to the <! in HIBERNATE-CONFIGURATION-3.0.DTD Public in the doctype...>,
Select the public ID (or directly select "URI");
7, "Key:" to the right of the text box, the HIBERNATE-CONFIGURATION-3.0.DTD in the <! Doctype...>
Copy the contents in the double quotation mark after the public in, and then paste it into the text box to the right of the "Key:"
Note that the contents of copy are not enclosed in double quotes "";
8, click "OK", you can see "User Specified Entries" has increased the DTD (key);
Similarly, the addition of this DTD can be hibernate-mapping-3.0.dtd;
9, restart the myeclipse can, note if the prompt does not come out,
And the "Content Assist not available at the present location" appears in the lower left of the status bar,
Please type a space at the cursor position and use alt+/to try again.