Currymunch
Member
- Joined
- Jan 21, 2008
- Messages
- 13
- Programming Experience
- Beginner
Hi all, I'm having a spot of bother when it comes to reading a file from XML into vb.net 2003.
using a previous poster's help thus far i have wrangled up
'**************************************************
'responds to a click event
'*****************************************
Whilst this is a step forward for my project I am looking to delimit the String that you get, thus
'************************************************
would be recieved as
![](http://img401.imageshack.us/img401/7817/wantedformatyh5.th.png)
rather than the current format of
![](http://img401.imageshack.us/img401/858/recievedxn4.th.png)
Thanks a lot for any help that you can muster up.
using a previous poster's help thus far i have wrangled up
'**************************************************
'responds to a click event
VB.NET:
Dim doc As New XmlDocument
doc.Load("XmlTest.xml")
Dim xmlNlist As XmlNodeList = doc.SelectNodes("//spy")
If ((Not xmlNlist Is Nothing) AndAlso (xmlNlist.Count > 0)) Then
Dim xnId As XmlNode
For Each xnId In xmlNlist
spyList.Items.Add(xnId.InnerText)
Next
End If
End Sub
'*****************************************
Whilst this is a step forward for my project I am looking to delimit the String that you get, thus
HTML:
<spyList>
<spy>
<firstName>Jo</firstName>
<surname>Bloggs</surname>
<codeName>JB</codeName>
<age>23</age>
<sex>Male</sex>
<dmarks>Tight</dmarks>
<sskills>Dancer</sskills>
<bankno>101</bankno>
<balance>0.00</balance>
</spy>
<spy>
<firstName>Al</firstName>
<surname>Capone</surname>
<codeName>JB</codeName>
<age>65</age>
<sex>Male</sex>
<dmarks>Fat</dmarks>
<sskills>Dancer</sskills>
<bankno>101</bankno>
<balance>0.00</balance>
</spy>
</spyList>
would be recieved as
![](http://img401.imageshack.us/img401/7817/wantedformatyh5.th.png)
rather than the current format of
![](http://img401.imageshack.us/img401/858/recievedxn4.th.png)
Thanks a lot for any help that you can muster up.
Last edited by a moderator: