VB.Net by API/System.Xml/XMLTextReader — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:50, 26 мая 2010
New XmlTextReader
Imports System.Xml.Serialization, System.IO
Imports System.Xml
Public Class Tester
Public Shared Sub Main
Dim myXMLTextReader As New XmlTextReader("doc.xml")
myXMLTextReader.ReadStartElement("UserChoice")
Do While myXMLTextReader.Read()
If myXMLTextReader.Name = "UserChoice" Then Exit Do
Console.WriteLine(myXMLTextReader.ReadOuterXml)
Loop
myXMLTextReader.Close()
End Sub
End Class
XMLTextReader.ReadStartElement
Imports System.Xml.Serialization, System.IO
Imports System.Xml
Public Class Tester
Public Shared Sub Main
Dim myXMLTextReader As New XmlTextReader("doc.xml")
myXMLTextReader.ReadStartElement("UserChoice")
Do While myXMLTextReader.Read()
If myXMLTextReader.Name = "UserChoice" Then Exit Do
Console.WriteLine(myXMLTextReader.ReadOuterXml)
Loop
myXMLTextReader.Close()
End Sub
End Class