读取xml,返回对象
??? ??? ??? System.out.println("merchantName = " + entry.getValue().getMerchantName());
??? ??? }
??? }
}
xml
<?xml version="1.0" encoding="UTF-8"?>
<merchants version="1.0">
??? <merchant corpID="000001" coopID="W20130701" actID="HD0001">盈盈理财</merchant>
</merchants>
?
public class CorpMerchantDto implements Serializable {
??? /**
??? ?* @Fields serialVersionUID: 2005927276049639976L
??? ?*/
??? private static final long serialVersionUID = 2005927276049639976L;
???
??? /**
??? ?* 商户代码
??? ?*/
??? private String corpID;
???
??? /**
??? ?* 商户名称
??? ?*/
??? private String merchantName;
???
??? /**
??? ?* 合作代码
??? ?*/
??? private String coopID;
???
??? /**
??? ?* 活动代码
??? ?*/
??? private String actID;
??? /**
??? ?* @return the corpID
??? ?*/
??? public String getCorpID() {
??? ??? return corpID;
??? }
??? /**
??? ?* @param corpID the corpID to set
??? ?*/
??? public void setCorpID(String corpID) {
??? ??? this.corpID = corpID;
??? }
??? /**
??? ?* @return the merchantName
??? ?*/
??? public String getMerchantName() {
??? ??? return merchantName;
??? }
??? /**
??? ?* @param merchantName the merchantName to set
??? ?*/
??? public void setMerchantName(String merchantName) {
??? ??? this.merchantName = merchantName;
??? }
??? /**
??? ?* @return the coopID
??? ?*/
??? public String getCoopID() {
??? ??? return coopID;
??? }
??? /**
??? ?* @param coopID the coopID to set
??? ?*/
??? public void setCoopID(String coopID) {
??? ??? this.coopID = coopID;
??? }
??? /**
??? ?* @return the actID
??? ?*/
??? public String getActID() {
??? ??? return actID;
??? }
??? /**
??? ?* @param actID the actID to set
??? ?*/
??? public void setActID(String actID) {
??? ??? this.actID = actID;
??? }
?