Shared Sub Main()
Dim DSStudentClasses As New DataSet()
Dim tmpNode As XmlNode
' Load the schema into the DataSet
DSStudentClasses.ReadXmlSchema("StudentClasses.xsd")
' Load the DataSet into the data document
Dim XDocStudents As New XmlDataDocument(DSStudentClasses)
' Load the data into the data document
XDocStudents.Load("Students.xml")
Console.WriteLine("Students in DataSet:")
Dim Row As DataRow
For Each Row In DSStudentClasses.Tables("Student").Rows
Console.WriteLine("{0}:{1}", Row("Name"), Row("GPA"))
tmpNode = XDocStudents.GetElementFromRow(Row)
Console.WriteLine( _
" Locker Combination (from XML, not DataSet): {0}", _
tmpNode.SelectSingleNode("LockerCombination").InnerText)
Dim Subject As DataRow
For Each Subject In Row.GetChildRows("StudentClasses")
Console.WriteLine(" {0}", Subject("Title"))
Next
Next
End Sub




