Public Class MainClass
Shared Sub Main()
Dim file As String = "books.xml"
Dim doc As New System.Xml.XmlDocument
doc.Load(file)
Dim nodes As System.Xml.XmlNodeList
nodes = doc.SelectNodes("shelf/book")
Dim counter = 0
Do Until counter = nodes.Count
System.Console.WriteLine(nodes.Item(counter).SelectSingleNode("title").InnerText & " by " & nodes.Item(counter).SelectSingleNode("author").InnerText & vbCrLf)
counter = counter + 1
Loop
End Sub
End Class