I have a DataTable which I select from database(Well,these data cross several tables,after the query and putting into a DataTable,it shows at below)
ColumnA ColumnB
a 11
b 33
b 44
a 22
b 55
but I want to transform it into an XML like this
<root>
<header name ='a'>
<item name='11' />
<item name='22' />
</header>
<header name ='b'>
<item name='33' />
<item name='44' />
<item name='55' />
</header>
</root>
Is there an easy way to implement it by C#?