Xstream之常用方式与常用注解
参考资料 1 xStream框架完美实现Java对象和xml文档JSON、XML相互转换 http://www.cnblogs.com/hoojo/archive/2011/04/22/2025197.html 2 xStream完美转换XML、JSON http://archive.cnblogs.com/a/2025197/ 官网:http://xstream.codehaus.org/download.html 相关jar包可在: XStream之初识 http://liuzidong.iteye.com/blog/1059453 下载 示例代码 Java代码 Blog teamBlog = new Blog( new Author( "Guilherme Silveira" )); teamBlog.add( new Entry( "first" , "My first blog entry." )); eamBlog.add( new Entry( "tutorial" , "Today we have developed a nice alias tutorial. Tell your friends! NOW!" )); XStream xstream = new XStream(); System.out.println(xstream.toXML(teamBlog