Help with idedtifying last element in xml file and obtaining total number of records in an xml file
Posted on 2012-04-08
I am using the cide below to check for a value in an xml file and would like to exit the loop if no match found and the last Receiver_ID element is checked, how do I modify my code to include the syntax for the last Receiver_ID element in my xml file? Or is there a way to obtain the totatal number of Receiver_ID in my file and use the count in my code, for example if count = 10 and Link_ID <> ""?
For Each xnLink As Xml.XmlNode In xdLink.SelectNodes("/Root/LinkA[Receiver_ID='" & C1Receiver.SelectedItem.Value & "']")
Link_ID = xnLink.SelectSingleNode("LinkAID").InnerText
If (positioned in Last Receiver_ID) and Link_ID <> ""