I am writing a WebService that is supposed to convert DataSet into XML. My DataSet is actually list of hotels with categories. Each hotel can belong to one or more categories. I
You could write an sql that would produce the desired model, in xml format directly from the database, like...
SELECT HotelName,
(select CategoryName from HotelCategories
where CategoryHotelName=HotelName
for xml path('Category')) as Categories
FROM Hotels
for xml path('Hotels')
Ofcourse depending on your DB layout...