這個對於很多xml格式的配置文件編輯很有幫助,以spring配置文件為例:
myeclipse的童鞋進入:window -> Preferences-> MyEclipse -> Editors -> XML ->XML Catalog
eclipse的童鞋進入:window -> Preferences-> XML ->XML Catalog
或者再接再 Preferences 里面的搜索框輸入xml就能看到其下面有 XML Catalog 選中
選擇:選中“User Specified Entries”,點擊“Add...”按鈕
填入:
location: 選擇本地文件系統上 spring-beans-3.2.xsd 文件 (我的在E:\spring\spring-beans-3.2.xsd)
注意:spring-beans-3.2.xsd在spring-beans-3.2.8.RELEASE.jar包內,解壓后可以找到
Key Type: 選擇URI
Key:
點擊確定
將spring配置文件關閉再重新打開即可。可以使用XML Editor打開這些xml文件。