javax.xml.bind.annotation 包解析xml @XmlElement @XmlAttribute接收请求返回xml格式数据

package com.ig.gapi.result.av;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;

 
@XmlRootElement(name="bbtech")
@XmlAccessorType(XmlAccessType.FIELD)
public class AVBetWinHistoryAllResult implements Serializable{
    @XmlElement(name = "response")
    public Response response;

    public static class Response {
        @XmlElement(name="records")
        public Records records;
    }

    public static class Records {
        @XmlElement(name="record")
        public List record;
    }

    public static class AVRecord {
        @XmlElement(name="tid")
        public String tid;

        @XmlElement(name="userID")
        public String userID;

        @XmlElement(name="roundid")
        public String roundid;

    
package com.cc.gapi.result.gg;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
@XmlRootElement(name="row")
public class AGBet implements Serializable {
   @XmlAttribute(name="ID")
   public String id;
  
   @Override
   public String toString() {
     return "User[id=" + id + "]";
}}}

你可能感兴趣的:(web后端开发)