XML VB.Net Tutorial

Option Strict
Option Explicit
Imports System
Imports System.IO
Imports System.Xml
'Reads an XML document
Public Class Sample
    Private Const filename As String = "items.xml"
    Public Shared Sub Main()
        Dim reader As XmlTextReader = Nothing
        Try
             reader = New XmlTextReader(filename)
            reader.WhitespaceHandling = WhitespaceHandling.None
            While reader.Read()
                Select Case reader.NodeType
                    Case XmlNodeType.Element
                        Console.Write("<{0}>", reader.Name)
                    Case XmlNodeType.Text
                        Console.Write(reader.Value)
                    Case XmlNodeType.CDATA
                        Console.Write("CDATA:0", reader.Value)
                    Case XmlNodeType.ProcessingInstruction
                        Console.Write("", reader.Name, reader.Value)
                    Case XmlNodeType.Comment
                        Console.Write("", reader.Value)
                    Case XmlNodeType.XmlDeclaration
                        Console.Write("")
                    Case XmlNodeType.Document
                    Case XmlNodeType.DocumentType
                        Console.Write("                    Case XmlNodeType.EntityReference
                        Console.Write(reader.Name)
                    Case XmlNodeType.EndElement
                        Console.Write("", reader.Name)
                End Select
            End While
        Finally
            If Not (reader Is Nothing) Then
                reader.Close()
            End If
        End Try
    End Sub
End Class