I have an Activity class, it has list of children subactivities, each of said subactivities have its own list and so on.
public class Activity
{
private Activity parent;
private ArrayList<Activity> children = new ArrayList();
private String name;
}
Is there an efficent way to parse it into XML file that looks like something like this:
<Activity name="1">
<children>
<Activity name="2>
<children>
<Activity name="3">
</children>
</children>
<Activity name ="4">
and so on?