答案 0 :(得分:0)
我使用了这2个课程&他们像冠军一样工作。这适用于前三个元素,字符串,edu.common.blahblahblah,以及它的嵌套元素字符串。你必须自己添加其余部分。将来粘贴文本与图像捕获相比会更有帮助。 THX。
@XmlRootElement(name = "entry")
public class Entry {
private String string;
private MultiSelectListBox multiSelect;
public Entry() { }
/**
* @return the string
*/
public String getString() {
return string;
}
/**
* @param string the string to set
*/
@XmlElement(name="string")
public void setString(String string) {
this.string = string;
}
/**
* @return the multiSelect
*/
public MultiSelectListBox getMultiSelect() {
return multiSelect;
}
/**
* @param multiSelect the multiSelect to set
*/
@XmlElement(name = "edu.common.dynamicetextensions.domain.nui.MultiSelectListBox")
public void setMultiSelect(MultiSelectListBox multiSelect) {
this.multiSelect = multiSelect;
}
}
和
public class MultiSelectListBox {
private int idNummer;
private int responseID;
public int getId() {
return responseID;
}
@XmlElement(name = "id")
public void setId(int id) {
this.responseID = id;
}
private int getIdNummer() {
return idNummer;
}
@XmlAttribute(name="id")
private void setIdNummer(int idNummer) {
this.idNummer = idNummer;
}
}