In my table duplicated ID value is their,that's reason,
Example data:Employee
ID Name Job DeptName Loc
1 a Mgr sales USA
1 a xxx ffff UK
I want to display data like below
<Employees>
<ID>1</ID>
<NAME>a</NAME>
<DEPTS>
<Dept>
<Job>mgr</Job>
<DeptName>sales</DeptName>
<Dept>
<Dept>
<Job>xxx</Job>
<DeptName>fff</DeptName>
<Dept>
</DEPTS>
<EMPLOYEES>
I want this type of output,database values
Can you give me the code for this,How can i start?