hi
I have problem can't parse xml to show with condition
it not show any thing in textbox .
help me please....
read xml forom hear.
I have problem can't parse xml to show with condition
it not show any thing in textbox .
help me please....
VB.NET:
Dim xdocaa As XDocument = XDocument.Load("C:\xml\login.xml") Dim sb As New StringBuilder
'asuming you have more than 1 plugin in the xml file
Dim Subjet = From x In xdocaa.Root.Elements Where x.<course>.Value = "Principles of Programming Languages" And x.<subsec>.Value = "800"
For Each el As XElement In Subjet.<all_topic>.<topic> 'xdocaa.Root.Elements.<all_topic>.<topic>
sb.AppendFormat("Topic : " & el.<topicname>.Value & Environment.NewLine & _
"Description : " & el.<topicdetail>.Value & Environment.NewLine & _
"Subject : " & el.<topicadviser>.Value & Environment.NewLine & _
"Sec : " & el.<topicdate>.Value & Environment.NewLine & _
"--------------------------------------------------" & Environment.NewLine & Environment.NewLine)
Next
txtlogin.Text = sb.ToString
read xml forom hear.
VB.NET:
<?xml version='1.0' encoding='TIS-620'?>
<subjects>
<subject name = "Principles of Programming Languages ">
<subsec>800</subsec>
<subdate>F-13-16</subdate>
<all_topic>
<topic>
<topicname>Make Class</topicname>
<topicdetail>Student's Principle of Programing lang make class in 30/12/2011</topicdetail>
<topictype>Make</topictype>
<topicdate>2011-12-18 00:00:00</topicdate>
<topicadviser>Corets, Eva</topicadviser>
</topic>
<topic>
<topicname>Maeve Ascendant</topicname>
<topicdetail>After the collapse of a nanotechnology society in England</topicdetail>
<topictype>Make</topictype>
<topicdate>2012-02-01 20:36:09</topicdate>
<topicadviser>Ralls, Kim</topicadviser>
</topic>
</all_topic>
</subject>
<subject name = "c Programming Languages">
<subsec>870</subsec>
<subdate>W-13-16</subdate>
<all_topic>
<topic>
<topicname>Alseif Ascendant</topicname>
<topicdetail>After the collapse of a nanotechnology society in England</topicdetail>
<topictype>Make</topictype>
<topicdate>2012-02-01 20:36:09</topicdate>
<topicadviser>Ralls, Kim</topicadviser>
</topic>
</all_topic>
</subject>
</subjects>