Hello, C# 2005. I have a dataset with 3 tables, and I would like to get the xml for just one of these tables. Any idea?
TY
Hello, C# 2005. I have a dataset with 3 tables, and I would like to get the xml for just one of these tables. Any idea?
TY
Here's a snippet from http://dotnetslackers.com/articles/ado_net/MappingDataSetToXMLAndBackwards.aspx. I'd suggest you read the whole article.
DataTable.WriteXML
is the method you need for just one table.
Something like:
private void SingleTableToXml(DataSet ds)
{
ds.Tables["myTable"].WriteXML(Server.MapPath("mytable.xml"),XmlWriteMode.IgnoreSchema);
}