I have 2 questions on how how to parse a specific aspect of this XML in JAXB with annotations.
Assuming I have a FosterHome class defined...
1) For the "Children" tag, is there a way to contain the properties within a "Children" class without having to create a separate "Info" class?
2) Since the perperties of the "Info" tag are related to "ChildList" also, should I be having two Child classes one without Info and one with Info? Or is there a better way?
Im trying to find the best way to parse this. Please refer to this posting for current set of classes: How do I parse this XML in Java with JAXB?
<FosterHome>
<Orphanage>Happy Days Daycare</Orphanage>
<Location>Apple Street</Location>
<Families>
<Family>
<ParentID>Adams</ParentID>
<ChildList>
<ChildID>Child1</ChildID>
<ChildID>Child2</ChildID>
</ChildList>
</Family>
<Family>
<ParentID>Adams</ParentID>
<ChildList>
<ChildID>Child3</ChildID>
<ChildID>Child4</ChildID>
</ChildList>
</Family>
</Families>
<Children>
<ChildID>Child1</ChildID>
<Info>
<Age>6</Age>
<FavColor>Blue</FavColor>
</Info>
<ChildID>Child2</ChildID>
<Info>
<Age>8</Age>
<FavColor>Red</FavColor>
</Info>
...
</Children>
</FosterHome>