Dim stream As System.IO.StreamReader
stream = New StreamReader("cizen.xml")
Dim reader As XmlTextReader = New XmlTextReader(stream)
Do While (reader.Read())
Select Case reader.NodeType
Case XmlNodeType.Element 'Display beginning of element.
Console.Write("<" + reader.Name)
If reader.HasAttributes Then 'If attributes exist
While reader.MoveToNextAttribute()
Console.Write(" {0}='{1}'", reader.Name, reader.Value)
End While
End If
Console.WriteLine(">")
Case XmlNodeType.Text 'Display the text in each element.
Console.WriteLine(reader.Value)
Case XmlNodeType.EndElement 'Display end of element.
Console.Write("</" + reader.Name)
Console.WriteLine(">")
End Select
Loop
ผมread Xml ได้แล้ว แต่ จะเอา ค่ามาใส่ใน TextBox ยังไง ครับ ใครรุ้ช่อยหน่อยนะครับ