How to add an XML document to the DTD used for MyEclipse

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.