---
title: "在Eclipse中导入dtd和xsd文件，使XML自动提示（转）"
author: "ttxsj"
date: "2014-02-01T14:41:21Z"
tags: []
categories: ["Web前端"]
slug: "eclipse-dtd-xsd-xml"
draft: false
lastmod: "2014-02-01T14:41:21Z"
id: 2010743
url: "https://ttxsj.iteye.com/blog/2010743"
---

DTD 类型约束文件  
    1. Window-&gt;Preferences-&gt;XML-&gt;XML Catalog-&gt;User Specified Entries窗口中,选择Add 按纽  
          
    2.在Add XML Catalog Entry 对话框中选择或输入以下内容:  
        Location: F:/soft/programmingSoft/Framework/Ibatis/sql-map-config-2.dtd  
        Key Type: URI  
        KEY: [http://ibatis.apache.org/dtd/sql-map-config-2.dtd](http://ibatis.apache.org/dtd/sql-map-config-2.dtd)  
          
XSD 类型约束文件

    1. Window-&gt;Preferences-&gt;XML-&gt;XML Catalog-&gt;User Specified Entries窗口中,选择Add 按纽  
          
    2.在Add XML Catalog Entry 对话框中选择或输入以下内容:  
        Location: F:/soft/programmingSoft/Framework/Spring/spring-framework-2.5.6.SEC01-with-dependencies/spring-framework-2.5.6.SEC01/dist/resources/spring-beans-2.5.xsd  
        Key Type: Schema Location  
        KEY: [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd](http://www.springframework.org/schema/beans/spring-beans-2.5.xsd)