I have an XML file that has a lot of nested tags and nested tags.
A bit like this:
<bla>
<stuff1>aa</stuff1>
<stuff2>bb</stuff�>
<stuff3>
<stuff4>
<stuff5>cc</stuff5>
<stuff6>dd</stuff6>
<stuff7>ee</stuff7>
</stuff4>
<stuff8>
<stuff9>ff</stuff9>
<stuff10>gg</stuff10>
<stuff11>hh</stuff11>
</stuff8>
<stuff8>
<stuff81>ff</stuff81>
<stuff82>gg</stuff82>
<stuff83>hh</stuff83>
</stuff8>
<stuff12>
<stuff13>ii</stuff13>
<stuff14>jj</stuff14>
<stuff15>kk</stuff15>
</stuff12>
<stuff12>
<stuff13>ll</stuff13>
<stuff14>mm</stuff14>
<stuff15>nn</stuff15>
</stuff12>
</stuff3>
<stuff3>
<stuff4>
<stuff5>csdc</stuff5>
<stuff6>dfd</stuff6>
<stuff7>ege</stuff7>
</stuff4>
<stuff8>
<stuff9>ffr</stuff9>
<stuff10>gyg</stuff10>
<stuff11>huh</stuff11>
</stuff8>
<stuff8>
<stuff81>fjf</stuff81>
<stuff82>gfg</stuff82>
<stuff83>hdh</stuff83>
</stuff8>
<stuff12>
<stuff13>iwi</stuff13>
<stuff14>jej</stuff14>
<stuff15>kkd</stuff15>
</stuff12>
</stuff3>
</bla>
stuff3 is unbounded, i mean it can repeat a lot of times, same with stuff4, stuff8, stuff12.
So, I want to map this XML file to Javabeans.
public class Bla {
private
String stuff1;
private String stuff2;
private List stuff3;
}
public class Stuff3 {
private List Stuff4;
private List Stuff8;
private List Stuff12;
}
public class Stuff4 {
private string stuff5;
private string stuff6;
private string stuff7;
}
But I am a bit confused with the lists here. How does XStream handle that ?
I cannot find many advanced examples unfortunately.
Any advice, help would be much appreciated !
Thanks in advance