Nick_vbulletin3_import37364
New Member
first of all i want to show you what I want to achieve.I want to Generate a XML file out of classes that will look like the following:\[code\]<config> <criteria name="criteriaName" defaultValue="http://stackoverflow.com/questions/13706993/0"> <item value="http://stackoverflow.com/questions/13706993/1"> <criteria name="criteriaName2" defaultValue=""> <item value="http://stackoverflow.com/questions/13706993/foo"> </item> <item value="http://stackoverflow.com/questions/13706993/bar"> </item> </criteria> </item> <item value="http://stackoverflow.com/questions/13706993/2"> </item> </criteria> <criteria name="criteriaName3" defaultValue=""> <item value="http://stackoverflow.com/questions/13706993/foo"> </item> </criteria></config>\[/code\]Summary:
- Criteria has a name and a default value (wich can be String, int ordouble) and x items as childs.
- An Item has a value, which must be of the same type of the parents criteria defaultValue.
- An Item can also hold another criteria. The type of the defaultValue in the criteria is independent from the parents (item) type