Question: I\'m exporting a System.Data.DataTable to XML.
So far it works fine.
But I want to have all the data in attributes, which works fine as well.
But my problem now, i
Try setting the column DefaultValue to something valid
foreach (DataTable dt in ds.Tables) {
foreach (DataColumn dc in dt.Columns) {
dc.ColumnMapping = MappingType.Attribute;
//If type is DataType string
dc.DefaultValue = String.Empty;
}