2011年10月12日 星期三

Read xml content to DataSet


參考1 (不錯的blog)
------------
Imports System.Xml
Imports System.IO

Dim ds As New DataSet
'  use filestream class to read xml content.
Dim streamRead As New System.IO.FileStream("C\test.xml",  _
System.IO.FileMode.Open)

'Dataset can read content from FileStream.
ds.ReadXml(streamRead)

  '  Bind data to your control.
DataGridView1.DataSource = ds.Tables(0)

' Close FileStream object
streamRead.Close()

沒有留言:

張貼留言