我在使用改装转换器解析http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml此xml文档时遇到问题 如何为这种类型的xml文档创建Pojo类以进行改造xml转换器?
答案 0 :(得分:0)
像这样为
<强> GESMES:信封强>
public class Gesmes:Envelope
{
private Cube Cube;
public Cube getCube ()
{
return Cube;
}
public void setCube (Cube Cube)
{
this.Cube = Cube;
}
@Override
public String toString()
{
return "ClassPojo [Cube = "+Cube+"]";
}
}
多维数据集类
public class Cube
{
private String rate;
private String currency;
public String getRate ()
{
return rate;
}
public void setRate (String rate)
{
this.rate = rate;
}
public String getCurrency ()
{
return currency;
}
public void setCurrency (String currency)
{
this.currency = currency;
}
@Override
public String toString()
{
return "ClassPojo [rate = "+rate+", currency = "+currency+"]";
}
}