Imports System
Imports System.IO
Imports System.Xml
Public Class Sample
Public Shared Sub Main()
Dim xmlString As String = "" & _
"" & _
"" & _
"- test with a child element stuff
" & _
""
' Create an XmlReader
Using reader As XmlReader = XmlReader.Create(New StringReader(xmlString))
' Display all attributes.
If reader.HasAttributes Then
Console.WriteLine("Attributes of <" + reader.Name + ">")
Dim i As Integer
For i = 0 To (reader.AttributeCount - 1)
Console.WriteLine(" {0}", reader(i))
Next i
' Move the reader back to the element node.
reader.MoveToElement()
End If
End Using
End Sub
End Class