[原]彻底解决Eclipse中XML验证速度过慢的问题


彻底解决Eclipse中XML验证速度过慢甚至造成死机的问题


新建user_catalog.xml
(其中I:/Eclipse/CommonPlugins/DTD/ 目录下放置各种从网上下载的dtd文件)
如想添加新的dtd文件,修改此配置文件即可。

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" uri="file:///I:/Eclipse/CommonPlugins/DTD/web-app_2_4.xsd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_0_1.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_0.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_0.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1.3//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_1_3.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/validator_1_1.dtd" webURL="http://jakarta.apache.org/commons/dtds/validator_1_1.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/struts-config_1_0.dtd" webURL="http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/struts-config_1_1.dtd" webURL="http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/struts-config_1_2.dtd" webURL="http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd"/>
<public publicId="-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/tiles-config_1_1.dtd" webURL="http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd"/>
<public publicId="-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/dwr10.dtd" webURL="http://www.getahead.ltd.uk/dwr/dwr10.dtd"/>
<public publicId="-//Hibernate/Hibernate Configuration DTD 2.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/hibernate-configuration-2.0.dtd" webURL="http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"/>
<public publicId="-//Hibernate/Hibernate Configuration DTD 3.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/hibernate-configuration-3.0.dtd" webURL="http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"/>
<public publicId="-//Hibernate/Hibernate Mapping DTD 1.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/hibernate-mapping-1.1.dtd" webURL="http://hibernate.sourceforge.net/hibernate-mapping-1.1.dtd"/>
<public publicId="-//Hibernate/Hibernate Mapping DTD 2.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/hibernate-mapping-2.0.dtd" webURL="http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"/>
<public publicId="-//Hibernate/Hibernate Mapping DTD 3.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/hibernate-mapping-3.0.dtd" webURL="http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"/>
<public publicId="-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/hibernate-reverse-engineering-3.0.dtd" webURL="http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd"/>
<public publicId="-//SPRING//DTD BEAN//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/spring-beans.dtd" webURL="http://www.springframework.org/dtd/spring-beans.dtd"/>
<public publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/web-jsptaglibrary_1_1.dtd" webURL="http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"/>
<public publicId="-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" uri="file:///I:/Eclipse/CommonPlugins/DTD/web-jsptaglibrary_1_2.dtd" webURL="http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd"/>
</catalog>

方法一:将此文件直接放在 D:\Eclipse\workspace\.metadata\.plugins\org.eclipse.wst.xml.core\目录
下,eclipse 自动识别。

方法二:手动导入此文件,菜单 myeclipse->preferences->MyEclipse->Files and Editors->XML->xml catalog
选择 user specified entries 点 Add->Next Catalog 添加user_catalog.xml

posted on 2008-03-12 20:49 hijackwust 阅读(15262) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 
<2008年3月>
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345

导航

统计

常用链接

留言簿(6)

随笔档案(57)

友情链接

搜索

最新评论

阅读排行榜

评论排行榜