Imports System
Imports System.Xml.Linq
Imports Microsoft.VisualBasic.FileIO
Imports System.Text
Imports System.IO
Public Class MainClass
Public Shared Sub Main(ByVal args As String())
Dim xmlTree As XElement
Using parser As TextFieldParser = My.Computer.FileSystem.OpenTextFieldParser("data.txt")
parser.TextFieldType = FieldType.Delimited
parser.Delimiters = New String() {","}
parser.HasFieldsEnclosedInQuotes = True
xmlTree =
Dim currentRow As String()
Do While Not parser.EndOfData
currentRow = parser.ReadFields
xmlTree.Add(>
<%= currentRow(1) %>
<%= currentRow(2) %>
<%= currentRow(3) %>
<%= currentRow(4) %>
)
Loop
End Using
Console.WriteLine(xmlTree)
End Sub
End Class