EmersonH.Com

Transforming Knowledge into Power

  • Increase font size
  • Default font size
  • Decrease font size
Home VB.Net 2008 Data Populating a DataSet from an XML file using vb.net

Populating a DataSet from an XML file using vb.net

E-mail Print

'load xml into a dataset to use here
Dim dSet As New DataSet
Dim fs As FileStream
'open the xml file so we can use it to fill the dataset
Try
fs = New FileStream("C:\someXMLfile.xml, FileMode.Open)
Catch e As Exception
Debug.WriteLine(e)
End Try
'fill the dataset
Try
dSet.ReadXml(fs)
Catch ex As Exception
Debug.WriteLine(ex)
Finally
fs.Close()
End Try

Last Updated on Monday, 21 December 2009 17:39