myeclipse 添加XSD或者DTD文件

来源:互联网 发布:住宅设计优化 编辑:程序博客网 时间:2024/05/23 14:33

以添加spring的spring-beans-2.0.xsd为例:

1:Preferences->MyEclipse->XML->XML Catalog->选中User Specified Entries->点击Add;
2:Add XML Catalog Entry窗口:Key Type选择URI,Location选择File System选中dist\resources\文件夹下的spring-beans-2.0.xsd;
3:Add XML Catalog Entry窗口:Key Type选择Schema Location,Key路径在后面加上/spring-beans-2.0.xsd;

以添加struts2的struts-2.0.dtd为例:

1:Preferences->MyEclipse->XML->XML Catalog->选中User Specified Entries->点击Add;
2:Add XML Catalog Entry窗口:Key Type选择URI,Key路径在后面加上http://struts.apache.org/dtds/struts-2.0.dtd;
3:Add XML Catalog Entry窗口:Location选择File System选中struts-2.1.8.1\lib\struts2-core-2.1.8.1\struts-2.0.dtd;

转自:http://vickya.iteye.com/blog/1113277