用Dataset的GetXml方法:private static void DemonstrateGetXml()
{
    // Create a DataSet with one table containing two columns and 10 rows.
    DataSet ds = new DataSet("myDataSet");
    DataTable t = ds.Tables.Add("Items");
    t.Columns.Add("id", typeof(int));
    t.Columns.Add("Item", typeof(string));    // Add ten rows.
    DataRow r;
    for(int i = 0; i <10;i++)
    {
        r = t.NewRow();
        r["id"]= i;
        r["Item"]= "Item" + i;
        t.Rows.Add(r);
    }    // Display the DataSet contents as XML.
    Console.WriteLine( ds.GetXml() );
}