My class is annotated as
@Root
public class Geonames {
@Path("intersection/street1")
@Element
public String street1;
@Path("intersection/highway1")
@Element
public String highway1;
@Path("intersection/street2")
@Element
public String street2;
@Path("intersection/highway2")
@Element
public String highway2;
@Path("intersection/lat")
@Element
public String lat;
@Path("intersection/lng")
@Element
public String lng;
@Path("intersection/distance")
@Element
public String distance;
}
The XML is as such:
<geonames>
<intersection>
<street1>11th Street</street1>
<highway1>residential</highway1>
<street2>Campbell Street</street2>
<highway2>unclassified</highway2>
<lat>37.8098123</lat>
<lng>-122.2969874</lng>
<distance>0.07</distance>
</intersection>
</geonames>
But I get the error:
05-26 23:46:46.511: E//RequestProcessor.java:250(23618): Caused by:
org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy
@org.simpleframework.xml.Element(data=false, name=, required=true, type=void) on field
'street1' public java.lang.String com.mosier.securityapp.geonames.Geonames.street1 for
class com.mosier.securityapp.geonames.Geonames at line 4
This seems to indicate that street1 has not value, but of course it does. My annotation or class must be set up wrong, but I'm too new to this to see what's going. Is there an easy fix I'm overlooking?