Generate XML from DataTable, along with count
Hi,
I have an sql result set assigned to a datatable. The result set is of the form
ManagerId | VendorId | Count
------------------------------
M1 V1 10
M1 V2 5
M2 V1 10
M2 V2 5
M3 V1 10
M3 V2 5
I need to convert this into an XML and also, the sum of count needs to be shown at each level. so the output in this case wud be like..
-- M1 - 15
-- V1 - 10
-- V2 - 5
-- M2 - 15
-- V1 - 10
-- V2 - 5
-- M3 - 15
-- V1 - 10
-- V2 - 5
what is the simplest way to achieve this? Pls help.