I Have a Table with 3 fields  ID,name, city, for generating xml for mentioned fields, i have written query like below
 
                 select ID,name,city from Table For XML RAW('IDS'),elements,root('Cities'),
for the above i m getting output as follows
 
1
name1
city1  
 
 
The Above output is fine but now the question is i have  assigned particular ID for particular city and the cities under same Id Must be in single element 
i Mean i Want output as below
 
 
name1
city1
name2
city2
name3
city
  
The name1,name2,name3 and city1,city2,city3 are belonging toThe ID1 can anybody help me get the output as above please.....
 
 
Thanks In Advance