create and edit xml file.

Discussion in 'ASP .Net' started by Guoqi Zheng, Jan 14, 2004.

  1. Guoqi Zheng

    Guoqi Zheng Guest

    Dear sir,

    Dataset offer and nice method to write an xml file. However, I do not know
    how can I add extra attribute to this xml file.
    The following is my script to creat a XML file, I want to add <?xml
    version="1.0" encoding="UTF-8"?> <productFeed version="0"
    timestamp="20040105:22:00:05"> on top of that file.

    I am very new to ASP.NET, can someone point out how can I do this?

    Thanks in advanced.


    <my script>
    Dim objDataSet as New Dataset("Catalog")
    objAdapter.fill(objDataset, "Product")

    Dim filename As String = "E:\virtual_hosts\xxx\home\html\td\product.xml"
    ' Create the FileStream to write with.
    Dim myFileStream As New System.IO.FileStream _
    (filename, System.IO.FileMode.Create)
    ' Write to the file with the WriteXml method.
    objDataSet.WriteXml(myFileStream)
    myFileStream.Close()
    </my script>
     
    Guoqi Zheng, Jan 14, 2004
    #1
    1. Advertising

  2. Pooran Prasad, Jan 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. San Diego Guy
    Replies:
    0
    Views:
    581
    San Diego Guy
    Aug 7, 2003
  2. Schultz
    Replies:
    3
    Views:
    596
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Feb 14, 2005
  3. =?Utf-8?B?a2Vu?=
    Replies:
    1
    Views:
    10,392
    Wiktor Zychla [C# MVP]
    Jan 23, 2006
  4. Sharon McCarty
    Replies:
    0
    Views:
    278
    Sharon McCarty
    Nov 24, 2004
  5. Krithika San
    Replies:
    3
    Views:
    355
    Marnen Laibow-Koser
    Nov 14, 2009
Loading...

Share This Page