1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Public Function getXMLInfo(ByVal ls_type As String, ByVal ls_name As String) As String
' fonction d'appel d'un label dans la string XML
If li_codRet = 0 Then
Dim sreader As New StringReader(ls_result)
Dim document As XPathDocument = New XPathDocument(sreader)
Dim navigator As XPathNavigator = document.CreateNavigator()
Dim iterator As XPathNodeIterator = navigator.Select("root/" & ls_type & "[NAME=" & ls_name & "]")
' retour de la fonction
getXMLInfo = (iterator.Current.Value).ToString
Else
getXMLInfo = "Label Unknown"
End If
End Function |
Partager