fletchsod
Programmer
- Dec 16, 2002
- 181
I can't help it if the Credit Bureaus xml data is random. I get the "Object variable or with variable not set" error when one of the childNodes or nodeName doesn't have this xml tag. So, in order to avoid the error, I need to be able to detect the xml tag as whether does it exist or not, if not exist then skip it. So, how do you guys do that?
Code:
'Get Credit Score for Individual (this xml tags is compatible with Equifax, Experian and Trans Union)...
sJunkStr = oXmlDoc2.childNodes(0).childNodes(0).childNodes(4).childNodes(iNode_I).childNodes(15).childNodes(0).childNodes(1).nodeName
If UCase(sJunkStr) = "SCORE" Then
sScore_I = oXmlDoc2.childNodes(0).childNodes(0).childNodes(4).childNodes(iNode_I).childNodes(15).childNodes(0).childNodes(1).Text
[Score #1].Value = sScore_I
End If