【发布时间】:2010-02-23 22:06:05
【问题描述】:
这一定是一个新手问题,但我无法从http://x-stream.github.io/得到它。
嗯,我有以下 xml 字符串
<cat age="4" >
<name>Garfield</name>
</cat>
需要映射到:
class Cat {
int age;
String name;
}
有没有一种使用 XStream 的简单方法来做到这一点?如果没有,我还能尝试什么?
提前致谢。
【问题讨论】:
标签: java xstream xml-deserialization