ข้อมูล
Date : 31/03/2010 08:05:35 From : [email protected] Subject : TS-074644-10
Date : 31/03/2010 08:05:35 From : tungman_it19 Subject : TS-074644-10
Date : 31/03/2010 09:46:38 From : jutatip.s Subject : TS-005281-03
Date : 31/03/2010 09:46:38 From : jutatip.s Subject : TS-005281-03
Date : 31/03/2010 09:46:39 From : jutatip.s Subject : TS-005280-03/R1
save Filename = LogMail.txt
Dim s() As String = File.ReadAllLines("G:\TS_APP\LogMail.txt")
Dim data As XElement = _
<LogMail>
<%= From f In s _
Let c = f.Split(New String() {ControlChars.Tab}, StringSplitOptions.RemoveEmptyEntries) _
Select _
<Data>
<Date><%= Split(c(0), "Date : ") %></Date>
<Sender><%= Split(c(1), "From : ") %></Sender>
<Subject><%= Split(c(2), "Subject : ") %></Subject>
</Data> %>
</LogMail>