xsl和xml完美结合的。
不用xsl好象还是不行的吧。
不用xsl好象还是不行的吧。
解决方案 »
- linux服务器 tomcat mysql偶尔出现乱码的问题,求解答
- java中获取业务bean的方式,报错
- spring mvc
- 求1个正则表达式
- struts 错误 No configuration found for the specified action
- 现针对网上流传的一些hibernate观点总结
- struts2.x 我真的快崩溃了,求大牛指点!
- tomcat 怎么设置不要虚拟目录就可以访问我的 网页? 就是直接打 127.0.0.1:8080就可以?
- 关于远程调用
- weblogic初级问题,不知原因,帮忙!!
- jbuiler8的注册码或注册文件(*.slip)??
- Java如何调用dll文件的功能呢?
/**
* filter String to HTML
*
* @param value string to filter
* @return filted string
*/
public static String filter(String value) {
if (value == null) {
return (null);
} StringBuffer result = new StringBuffer(); for (int i = 0; i < value.length(); i++) {
char ch = value.charAt(i); if (ch == '<') {
result.append("<");
} else if (ch == '>') {
result.append(">");
} else if (ch == '&') {
result.append("&");
} else if (ch == '"') {
result.append(""");
} else if (ch == '\r') {
result.append("<BR>");
} else if (ch == '\n'){
if (i > 0 && value.charAt(i-1) == '\r') { } else {
result.append("<BR>");
}
} else if (ch == '\t') {
result.append("  ");
} else if (ch == ' ') {
result.append(" ");
} else {
result.append(ch);
}
}
return (result.toString());
}
因为我用的jdk1.3的包,解析和生成xml,都需要一个外挂包,而不是本身有的
所以,一些方法,就不太好搞了