Eclipese编写XML自动提示问题
来源:互联网 发布:剑三七秀萝莉捏脸数据 编辑:程序博客网 时间:2024/05/11 16:58
在Eclipse中编写Spring、ibatis、hibernate等配置文件时,可能不会出现元素的提示功能。在网上也有很多资料,无非是添加DTD约束和XSD约束。但是在添加完这些步骤之后可能还会没有提示,可能问题是如下:
1.确定XML文件的默认打开方式XML-editor,否则不会出现自动提示,本人开始就是出现这个原因。对于不是XML-editor自动打开的可以到window->preferences->general->editors->file associations 中选中*.xml的下面的打开方式,并选中xml-editor为默认的即可。那样以后打开xml文件时默认的打开方式就是xml-editor;
2.确定打开了自动提示功能。这一点可以到Window > Preferences > Xml > Xml Files > Editor > Content Assist > Auto activation > Prompt when these characters are inserted看到 ,设置框中默认是 <=;
3.确定上面两点都没问题后,再按照以下方式来配置(以添加Spring的配置文件为例,其他的类似):
DTD 类型约束文件
1. Window->Preferences->XML->XML Catalog->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
XSD 类型约束文件
1. Window->Preferences->XML->XML Catalog->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
- Eclipese编写XML自动提示问题
- Eclipese无法自动弹出提示
- 编写struts.xml时的提示问题
- Eclipese解决65535问题
- Eclipese解决65535问题
- struts.xml中标签自动提示问题
- 解决struts.xml文件自动提示问题
- myeclipse中xml自动提示问题
- java 编写xml文件时显示自动提示
- Apache Ant编写build.XML的自动提示 ANT DTD
- eclipse和myclipse编写xml文件,java自动提示功能
- 配置Eclipse编写JAVA/JS/HTML/XML自动提示
- 在配置文件中编写代码,不能自动提示问题
- 总结:eclipse编写struts.xml没有提示的问题
- 怎么为struts.xml或dwr.xml的编写添加自动提示功能
- xml配置文件自动提示
- eclipse xml自动提示
- jsp,xml自动提示
- windows编程---
- Fortran 调用Dll
- 一个程序员的创业历程
- UVA(WA) 10815 安迪的第一个字典
- maven 入门教程
- Eclipese编写XML自动提示问题
- 关于PL2303用于STC单片机下载的讨论
- windows编程---对话框
- 苹果报复名单确定:欲禁售8款三星产品
- 23个.NET开源项目
- 编程珠玑--编程技巧
- 黑马程序员——求两个字符串的最大相同字串
- 关于diff和patch工具的使用
- socket_client段程序