Imports System.Xml Public Class Form1 Dim BooksReader As XmlTextReader Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) MyBase.OnLoad(e) 'Create the XMLTextReader object that reads from the file BooksReader = New XmlTextReader(Application.StartupPath + "\books.xml") End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click 'Read the nodes until the end of file is reached While (BooksReader.Read()) Select Case (BooksReader.NodeType) Case XmlNodeType.Element ListBox1.Items.Add("Element: " + BooksReader.Name) Exit Select Case XmlNodeType.Text ListBox1.Items.Add("Text: " + BooksReader.Value) Exit Select End Select End While BooksReader.Close() End Sub End Class