Re: Creating XML Output from a DS

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

From: Richard L Rosenheim (richard_at_rlr.com)
Date: 10/10/04


Date: Sun, 10 Oct 2004 02:23:49 -0700

What version of VB.Net are you using? I'm using Visual Studio 2003 and I'm
getting the XML header line.

I'm also specifying the actual file name rather than creating a FileStream.
My code looks more like this:
    FileNameStr = "C:\MyXMLFile.xml"
    ds1.WriteXML(FileNameStr)

Richard Rosenheim

"Wayne Wengert" <wayneDONTWANTSPAM@wengert.com> wrote in message
news:%23RlRpvkrEHA.868@TK2MSFTNGP10.phx.gbl...
> I am using VB.NET to create an output stream in XML format. When I execute
> the code below, the XML header line (<?xml version = "1.0"?>) is not
> included in the output file. Is there a way to include that?
>
> ================ code =================
> Dim myFileStream As New System.IO.FileStream(strFN,
> System.IO.FileMode.Create)
>
> ' Write to the file with the WriteXml method.
>
> ds1.WriteXml(myFileStream)
>
> =================================================
>
>