I found out how to convert a DataTable into XML using this post - How can I convert a DataTable to an XML file in C#?
string result;
using (StringWriter sw = new StringWriter()) {
dataTable.WriteXml(sw);
result = sw.ToString();
}
In the above code, we see that each row will be enclosed with TABLE tags. Is there any way I could replace it with custom tags, like ROW ? Of course, I could search the string itself and replace TABLE with ROW, but I want a different approach.