All is in the title. I'm new with Jaxb and the XML stuff. I can acces to others namespaces like < summary> or < id> etc... But namespaces with < str name=""> or < int name="">, i can't. Can you help me? I'm a little lost. All i have is null data, i don't find the way.
Here's the code:
Feed class:
@XmlRootElement(name = "feed")
@XmlAccessorType(XmlAccessType.FIELD)
public class Feed {
@XmlElement(name = "entry")
private List<Entry> entries;
public List<Entry> getEntries() {
return this.entries;
}
}
Entry Class:
@XmlRootElement(name = "entry")
@XmlAccessorType(XmlAccessType.FIELD)
public class Entry {
//@XmlElement(name = "footprint")//<str name="footprint"> dont work.
//@XmlAttribute(name="footprint")//dont work
//@XmlValue//dont work
private String footprint;
@XmlElement(name = "uuid")
private String id;
@XmlElement(name = "size")
private String size;
public Entry() {}
public String getCoordinates() {
return footprint;
}
public String getId() {
return id;
}
public String getSize() {
return size;
}
public void setCoordinates(String footprint) {
this.footprint=footprint;
}
public void setSize(String size) {
this.size=size;
}
public void setId(String id) {
this.id=id;
}
}
The XML:
Thank you !