I have a table called "Company"
[code=text]
Company:
Id Name ParentId Level
1 A NULL 0
2 B 1 1
3 C 1 1
4 D 2 2
5 E 2 2
6 F 3 2
7 G 3 2
Here I want to return the list of all chaild companies in XML format.
The XML format should be like
<Node Id="1" Name="A">
<Node Id="2" Name="B">
<Node Id="4" Name="D" />
<Node Id="5" Name="E" />
</Node>
<Node Id="3" Name="C">
<Node Id="6" Name="F">
<Node Id="7" Name="G">
</Node>
</Node>
[/code]
How can i do this... any help
[code=text]
Company:
Id Name ParentId Level
1 A NULL 0
2 B 1 1
3 C 1 1
4 D 2 2
5 E 2 2
6 F 3 2
7 G 3 2
Here I want to return the list of all chaild companies in XML format.
The XML format should be like
<Node Id="1" Name="A">
<Node Id="2" Name="B">
<Node Id="4" Name="D" />
<Node Id="5" Name="E" />
</Node>
<Node Id="3" Name="C">
<Node Id="6" Name="F">
<Node Id="7" Name="G">
</Node>
</Node>
[/code]
How can i do this... any help
Comment