What you need to do is catch the exception, or check for a null value before making an assignment. Try something like:
If subList.childNodes.Count > 0 Then
sCallNumber = subLst.childNodes(0)
End If
Or,
If Not IsNull(subList.childNodes(0)) Then
sCallNumber = subLst.childNodes(0)
End If
I haven't checked the syntax I'm just going off the top of my head but you get the idea. You could even just change the program that generates the XML so it does not include tags that have no value.
Just a few ideas, hope they help.
Skin
|