Re: Writing xml to hdd

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: avnrao (avn_at_newsgroups.com)
Date: 06/24/04


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.



Relevant Pages

  • Re: Color drop down list box
    ... HTH ... Stephen Lebans ... Access Code, Tips and Tricks ...
    (microsoft.public.access.forms)
  • Re: assign a number
    ... There are examples of how to accomplish that task here: ... HTH ... Fred Boer ... >I have a number field on a report, called job#, i would like to have access ...
    (microsoft.public.access.forms)
  • Re: Migrating member server from W2K to W2K3R2
    ... to keep the users/groups/datafiles intact. ... Anyway to accomplish this ... tool that will copy user accounts and groups between two computers. ...
    (microsoft.public.windows.server.migration)
  • RE: How to format a CD
    ... You may try DLA software from HP to accomplish this task, download from ... here(might work on non-HP systems): ... HTH ...
    (microsoft.public.windowsxp.general)