精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2006-11-16
官方网站:http://xstream.codehaus.org/
测试了一下,的确十分方便。 java 代码
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2006-11-16
第2个问题已经解决。
加入xpp3_min-1.1.3.4.O.jar(包含在xStream压缩包中) 将 XStream sm = new XStream(new DomDriver()); 修改为: XStream sm = new XStream(); |
|
返回顶楼 | |
发表时间:2006-11-17
好像转换的效率比较低~~
|
|
返回顶楼 | |
发表时间:2006-11-17
hibernate有第三方工具,可以方便的在xml/obj/db之间转换的。
|
|
返回顶楼 | |
发表时间:2006-11-17
目前我发现就xtream最简单,不需要生成dtd,无用配置,不需要生成辅助类,虽然功能相对其他的同类工具要简单,但是已经可以满足我的要求了. 所以才采用这个的.
|
|
返回顶楼 | |
发表时间:2007-03-29
I don't like xstream very much. There are lots of backwards compatibility problems when you upgrade ver1.1 to ver1.2. So, xstream is not a good choice for using widely.
|
|
返回顶楼 | |
发表时间:2007-03-30
JJYAO 写道 I don't like xstream very much. There are lots of backwards compatibility problems when you upgrade ver1.1 to ver1.2. So, xstream is not a good choice for using widely.
you are funny... we pick the latest version 1.2, no problem at all. backward incompatible should not be the reason why we should not use xstream... |
|
返回顶楼 | |
发表时间:2007-03-30
xstream + xpp 的组合绝对够出色
速度快 效率高(似乎是一个意思 哈哈) xpp3 最新版本是 xpp3-1.1.4c XML Pull Parser是一种高速的 解析xml文件的方式 速度要比传统方式快很多(但是功能弱了些) 感兴趣的可以去google一下 "xpp" |
|
返回顶楼 | |
发表时间:2007-03-30
fins 写道 xstream + xpp 的组合绝对够出色
速度快 效率高(似乎是一个意思 哈哈) xpp3 最新版本是 xpp3-1.1.4c XML Pull Parser是一种高速的 解析xml文件的方式 速度要比传统方式快很多(但是功能弱了些) 感兴趣的可以去google一下 "xpp" 偶像说什么我都信____追星的我 |
|
返回顶楼 | |
发表时间:2007-03-30
lordhong 写道 JJYAO 写道 I don't like xstream very much. There are lots of backwards compatibility problems when you upgrade ver1.1 to ver1.2. So, xstream is not a good choice for using widely.
you are funny... we pick the latest version 1.2, no problem at all. backward incompatible should not be the reason why we should not use xstream... e.g ver1.1 Class CollectionConverter(ClassMapper classMapper, java.lang.String classAttributeIdentifier) ver1.2 Class CollectionConverter(Mapper mapper) ver1.1 Interface ClassMapper.lookupName(java.lang.Class type) ver1.2 Don't have this method ver1.1 Interface HierarchicalStreamWriter void addAttribute(java.lang.String name, java.lang.String value) void endNode() void setValue(java.lang.String text) void startNode(java.lang.String name) ver1.2 Interface HierarchicalStreamWriter void addAttribute(java.lang.String name, java.lang.String value) void close() void endNode() void flush() void setValue(java.lang.String text) void startNode(java.lang.String name) HierarchicalStreamWriter underlyingWriter() You can find there are many differences between ver1.1 and ver1.2 and another serious problem that if your objects are loaded via hibernate and proxied by Cglib, an error will happen. but it runs well in ver1.1. Because ver1.2 uses cglib to enhance the process of serialization, but it has some limits. It is ok after i remove the reference of cglib from ver1.2 |
|
返回顶楼 | |