XmlTextReader.GetAttribute gets the value of the attribute with the specified name.
Imports System
Imports System.IO
Imports System.Xml
Public Class Sample
Public Shared Sub Main()
Dim reader As XmlTextReader = Nothing
Try
reader = New XmlTextReader("attrs.xml")
reader.MoveToContent()
Dim isbn As String = reader.GetAttribute("ISBN")
Console.WriteLine("The ISBN value: " & isbn)
Finally
If Not (reader Is Nothing) Then
reader.Close()
End If
End Try
End Sub 'Main
End Class 'Sample