码迷,mamicode.com
首页 > 其他好文 > 详细

xmlBean类

时间:2016-04-05 23:02:08      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:

package com.bwie.vo;

import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("oschina")
public class XmlBean {

    public String catalog;
    public String newsCount;
    public String pagesize;
    public Newslist newslist;

    @XStreamAlias("newslist")
    public class Newslist {
        @XStreamImplicit(itemFieldName = "news")
        public List<News> news;
    }

    public class News {

        public String id;
        public String title;
        public String body;
        public String commentCount;
        public String author;
        public String authorid;
        public String pubDate;
        public String url;
        public Newstype newstype;
    }

    @XStreamAlias("newstype")
    public class Newstype {

        public String type;
        public String authoruid2;
        public String eventurl;
        public String attachment;

    }

}

2、
package com.bwie.vo;

import java.util.List;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamImplicit;

@XStreamAlias("oschina")
public class XmlBean_1 {

    public String pagesize;
    public Blogs blogs;
 

    @XStreamAlias("blogs")
    public class Blogs {
        @XStreamImplicit(itemFieldName = "blog")
        public List<Blog> blog;
    }

    public class Blog {

        public String id;
        public String title;
        public String body;
        public String url;
        public String pubDate;
        public String authoruid;
        public String authorname;
        public String commentCount;
        public String documentType;
    }

}

 

 

 

xmlBean类

标签:

原文地址:http://www.cnblogs.com/8023-itxinde/p/5356929.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!