create and edit xml file.

G

Guoqi Zheng

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top