EDIT: Removed previous edit
I'm trying to deserialize the following:
<?xml version="1.0" encoding="UTF-8"?>
<ALL>
<KAMP>
<ID>1</ID>
<SQLTID>1376881200</SQLTID>
<DATO>2013-08-19</DATO>
</KAMP>
...
<KAMP>
<ID>2</ID>
<SQLTID>1376881200</SQLTID>
<DATO>2013-08-19</DATO>
</KAMP>
</ALL>
Using
@Root
public class Matches {
@ElementList
private List<Match> list;
public List getMatches() {
return list;
}
}
And
@Root(name = "KAMP", strict = false)
public class Match{
@Element(name = "ID", required = false)
public String Id;
@Element(name = "SQLTID", required = false)
public String Sqltid;
@Element(name = "DATO", required = false)
public String MatchDate;
}
I keep getting
Element 'KAMP' does not have a match in class <myClass>
I've tried adding (name = "KAMP")
to @ElementList
but it didn't help.
Can anyone else help?