Code hints for Eclipse editing XML files

Source: Internet
Author: User
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

Related Article

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.