Multiple Tables in an XML file.

rustyfancy

Member
Joined
Aug 5, 2003
Messages
23
Hey,

Anyone know how to include multiple Tables with various amounts of colums/rows in a single XML file???

--Matt
 
Sure, just create a DataSet and add different tables to it, and
save the DataSet.

Code:
Dim ds As New DataSet()
Dim table1 As New DataTable()
Dim table2 As New DataTable()

 Here you add the columns and rows and stuff

ds.Tables.Add(table1)
ds.Tables.Add(table2)

Then just save ds using the WriteXml() method.
 
Back
Top