Hey guys i'm attaching a SOAP request/response i'm working with.
Code breaks when xml TAG is missing at the end of my code. How can i manage this problem with NULL values????
Code breaks when xml TAG is missing at the end of my code. How can i manage this problem with NULL values????
Code:
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.SetProperty "SelectionLanguage", "XPath"
xmlDoc.async = False
With CreateObject("MSXML2.XMLHTTP")
xmlDoc.loadXML (get_akciz_codes)
End With
Set nID = xmlDoc.getElementsByTagName("ID")
Set nTitle = xmlDoc.getElementsByTagName("TITLE")
Set nMEASURMENT = xmlDoc.getElementsByTagName("MEASURMENT")
Set nSAKON_KODI = xmlDoc.getElementsByTagName("SAKON_KODI")
Set nAKCIS_GANAKV = xmlDoc.getElementsByTagName("AKCIS_GANAKV")
Dim Resp As String
For i = 0 To nID.Length - 1
rID = nID(i).TEXT
rTitle = nTitle(i).TEXT
[COLOR="Red"][B] rMEASURMENT = nMEASURMENT(i).TEXT[/B][/COLOR] 'Not available always
rSAKON_KODI = nSAKON_KODI(i).TEXT
rAKCIS_GANAKV = nAKCIS_GANAKV(i).TEXT
Next
End Function