Result Set to XML. How to generate a tree structure? Please help
Hello everyone,
I went through some of the posts here and I wasnt able to find my answer. Hence I am posting a new thread. If this question was already answered kindly point me to that thread.
My scenario:
I have a result set which has following set up
REGION | STATE | DISTRICT | CUSTOMER
NE| NY|NOT| A
NE| NY|NOT| B
NE| NY|MAN| A
NE| NY|MAN| B
..and so on. I would like to convert that result set into an XML with the following format.
<REGION> NE
<STATE>NY
<DISTRICT>NOT
<CUSTOMER> A </CUSTOMER>
<CUSTOMER> B </CUSTOMER>
</DISTRICT>
<DISTRICT>MAN
<CUSTOMER> A </CUSTOMER>
<CUSTOMER> B </CUSTOMER>
</DISTRICT>
</STATE>
</REGION>
Kindly let me know the possible ways of doing this. Code snippets will be very helpful to me. Thanks in advance

