Imports System
Imports System.Xml
Imports System.Xml.Schema
Imports System.IO
Imports System.Data
Public Class MainClass
Shared Sub Main()
Dim MyDS As New DataSet()
MyDS.ReadXmlSchema("book.xdr")
Console.WriteLine("Schema Loaded.")
Dim Table As DataTable
For Each Table In MyDS.Tables
Console.WriteLine("Table {0}, {1} Columns", _
Table.TableName, Table.Columns.Count)
Next
MyDS.ReadXml("book.xml", XmlReadMode.IgnoreSchema)
Console.WriteLine("Data Loaded.")
Console.WriteLine()
Dim Book As DataRow
For Each Book In MyDS.Tables("Book").Rows
Console.WriteLine("{0} : {1} - ${2}", Book("Title"))
Next
End Sub
End Class
'book.xdr
'
'
' ' model = "closed" />
'
'
'
'
'
'
'
'File: book.xml
'
'
'
' C# How to Program
'
'
' Java How to Program, 4/e
'
'
' Visual Basic .NET How to Program
'
'
' Advanced Java 2 Platform How to Program
'
'
' Python How to Program
'
'