XStream解析xml代码

Posted IT心得

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了XStream解析xml代码相关的知识,希望对你有一定的参考价值。

    XStream xStream = new XStream();
    xStream.processAnnotations(XmlBean.class);
    XmlBean fromXML = (XmlBean) xStream.fromXML(result);
    List<News> news = fromXML.newslist.news;

 

以上是关于XStream解析xml代码的主要内容,如果未能解决你的问题,请参考以下文章