Класс модели, который свойство определяет как: *
@XmlElement(name = "GEOMETRY")
protected List<String> geometrytype;
public List<String> getGEOMETRYTYPE() {
if (geometrytype == null) {
geometrytype = new ArrayList<String>();
}
return this.geometrytype;
}
/**
* Sets the value of the remarks property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setGEOMETRYTYPE(List<String> value) {
this.geometrytype = value;
}
Теперь назовите эту модель для класса .java
ArrayList<Coordinate> cord= l.getLinkPointList();
for(int j=0;j<cord.size();j++){
xml_node.getGEOMETRYTYPE().add("X=\""+ cord.get(j).x+ "\"Y=\""+cord.get(j).y+ "\"");
}
Любой другой вариант, но только с jaxb