Я пытаюсь перебрать xml и вывести узлы в сетку.
это код, который я использую:
Dim iCustomer As XPathNodeIterator = nav.Select(nav.Compile("//Content"))
While iCustomer.MoveNext() ' Loop through all customer nodes
' NOW you can get those child nodes
Dim Title As XPathNodeIterator = iCustomer.Current.SelectChildren("Title", "")
Dim iName As XPathNodeIterator = iCustomer.Current.SelectChildren("QuickLink", "")
Dim iContact As XPathNodeIterator = iCustomer.Current.SelectChildren("Teaser", "")
If Title.Count <> 0 Then ' If a node is found....
' You *might* have to call iListID.MoveNext() here
Title.MoveNext()
NewRow("Content_Title") = Title.Current.Value
' ListID = iListID.Current.Value ' ... set the value to the string
End If
' Do the above for each other value
End While
Я получаю только последнийдобавлен узел, как я могу вывести все соответствующие узлы.