hi. i want to generate XML for the following tree type structure. i attached picture. generated xml should be
<services>
<service>
<name>Service 1</name>
<categories>
<category>
<name>Cateogry 1</name>
<methods>
<method>
<name>Method 1</name>
</method>
</methods>
</category>
</categories>
</service>
<service>
<name>Service 2</name>
<categories>
<category>
<name>Cateogry 1</name>
<methods>
<method>
<name>Method 1</name>
</method>
</methods>
</category>
</categories>
</service>
<service>
<name>Service 3</name>
<categories>
<category>
<name>Cateogry 1</name>
<methods>
<method>
<name>Method 1</name>
</method>
</methods>
</category>
</categories>
</service>
</services>