Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net Convert Large XML file to dataset

Status
Not open for further replies.

rfemmer

Programmer
Feb 8, 2007
1
US
Can anyone tell me the best way to convert a large xml file to a dataset with VB.Net?

I've tried:
Dim ds As New DataSet
ds.ReadXml("C:\MyLargeXMLFile.xml")

Also tried using the XMLTextReader:

Dim myXMLfile As String = "C:\MyLargeXMLFile.xml"
Dim fsReadxml As System.IO.FileStream = New System.IO.FileStream(myXMLfile, System.IO.FileMode.Open)
Dim reader As XmlTextReader = Nothing
Dim xmlds = New DataSet
reader = New XmlTextReader(fsReadxml)
xmlds.ReadXml(reader)

These Both seem to take a long time to convert.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top