Is there a way to create a class for this kind of data?
<Condition>
<Action/>
<Action/>
<Condition>
<Action/>
<Action/>
<Condition>
<Condition>
<Action/>
</Condition>
</Condition>
</Condition>
</Condition>
The data above is intrepreted as <Condition>
as a Condition Object
and <Action>
as Action Object
.
The Scenario is that the hierarchy could be till 1 .. n depth, and it could be n number of nested condition with n number of actions inside.