Re: Writing xml to hdd
From: avnrao (avn_at_newsgroups.com)
Date: 06/24/04
- Next message: Roger Jack: "Automatically translate Open Source VB.Net projects to C#"
- Previous message: Benign Vanilla: "Nested Tables and User Controls"
- In reply to: Asha: "Writing xml to hdd"
- Next in thread: Asha: "Re: Writing xml to hdd"
- Reply: Asha: "Re: Writing xml to hdd"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Jun 2004 19:21:37 +0530
private void WriteXmlToFile(DataSet thisDataSet) {
if (thisDataSet == null) { return; }
// Create a file name to write to.
string filename = "myXmlDoc.xml";
// Create the FileStream to write with.
System.IO.FileStream myFileStream = new System.IO.FileStream
(filename, System.IO.FileMode.Create);
// Create an XmlTextWriter with the fileStream.
System.Xml.XmlTextWriter myXmlWriter =
new System.Xml.XmlTextWriter(myFileStream,
System.Text.Encoding.Unicode);
// Write to the file with the WriteXml method.
thisDataSet.WriteXml(myXmlWriter);
myXmlWriter.Close();
}
hth,
Av.
"Asha" <Asha@discussions.microsoft.com> wrote in message
news:B122E031-E0B3-4799-A23A-A00BC3D7E414@microsoft.com...
> how can i accomplish this task? from the dataset, i wan to transform it
> into an xml file and store it in the application server.
- Next message: Roger Jack: "Automatically translate Open Source VB.Net projects to C#"
- Previous message: Benign Vanilla: "Nested Tables and User Controls"
- In reply to: Asha: "Writing xml to hdd"
- Next in thread: Asha: "Re: Writing xml to hdd"
- Reply: Asha: "Re: Writing xml to hdd"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|