码迷,mamicode.com
首页 > 微信 > 详细

微信回复图文消息

时间:2017-04-22 09:38:00      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:元素   user   use   ring   url   access   field   style   rom   

微信回复图文消息

一级POJO只能包含一级子元素,如果是多级子元素,就包含多级对象就可以了;

@XmlRootElement(name="xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class ScanUrl {
    private Integer id;

    @XmlElement(name="ToUserName")
    private String toUserName;

    @XmlElement(name="FromUserName") 
    private String fromUserName;

    @XmlElement(name="CreateTime") 
    private Integer createTime;

    @XmlElement(name="MsgType") 
    private String msgType;

    @XmlElement(name="ArticleCount")
    private Integer articleCount;
    
    @XmlElement(name="Articles", type=ScanUrlItemOuter.class)
    private ScanUrlItemOuter scanUrlItemOuter;

 

@XmlRootElement(name="Articles")
@XmlAccessorType(XmlAccessType.FIELD)
public class ScanUrlItemOuter {

    @XmlElement(name = "item", type = ScanUrlItem.class)
    private List<ScanUrlItem> scanUrlItems;

 

@XmlRootElement(name="item")
@XmlAccessorType(XmlAccessType.FIELD)
public class ScanUrlItem {

    @XmlElement(name="Title")
    private String title;

    @XmlElement(name="Description") 
    private String description;

    @XmlElement(name="PicUrl") 
    private String picUrl;

    @XmlElement(name="Url")
    private String url;

清爽.

微信回复图文消息

标签:元素   user   use   ring   url   access   field   style   rom   

原文地址:http://www.cnblogs.com/stono/p/6746741.html

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