我有xml:
<people>
<person ID="1">
<surname>Petrov</surname>
<name>Petr</name>
<birthday>
<day>5</day>
<month>01</month>
<year>1993</year>
</birthday>
<birthplace city="Moscow"/>
<work>IBA</work>
</person>
</people>
,我需要对此进行整理,但是我不知道我对“出生地”的处理方式。现在,我使用jaxB,这是我的People.class:
public class Person {
@XmlAttribute(name = "ID")
private String personId;
@XmlElement
private String surname;
@XmlElement
private String name;
@XmlElement
private Birthday birthday;
***@ ???***
private String birthplace;
@XmlElement
private String work;
...