nondrinker
Programmer
Hello,
Below is the code that i am trying to use to read some data from of an xml file, using vb6. I have been getting this error: "Run-time error '91' Object variable or With block variable not set" on the line that i have pointed.
I have checked all the referneces and everything seems to be there.
Any help will be appreciated.
Thanks.
********************************************
Dim xmlas As MSXML2.DOMDocument
Set xmlas = New MSXML2.DOMDocument
Dim varstatus
Dim nodeAttribute
Dim objAttributes
Dim objRefAttr
xmlas.preserveWhiteSpace = True
xmlas.validateOnParse = True
xmlas.async = False
xmlas.Load ("Test.xml")
Set nodeAttribute = xmlas.selectSingleNode("//response[0]")
Set objAttributes = nodeAttribute.Attributes <-------This is where it breaks
Set objRefAttr = objAttributes.getNamedItem("cleintid")
varstatus = objRefAttr.Text
MsgBox varstatus
**********************************************
Below is the code that i am trying to use to read some data from of an xml file, using vb6. I have been getting this error: "Run-time error '91' Object variable or With block variable not set" on the line that i have pointed.
I have checked all the referneces and everything seems to be there.
Any help will be appreciated.
Thanks.
********************************************
Dim xmlas As MSXML2.DOMDocument
Set xmlas = New MSXML2.DOMDocument
Dim varstatus
Dim nodeAttribute
Dim objAttributes
Dim objRefAttr
xmlas.preserveWhiteSpace = True
xmlas.validateOnParse = True
xmlas.async = False
xmlas.Load ("Test.xml")
Set nodeAttribute = xmlas.selectSingleNode("//response[0]")
Set objAttributes = nodeAttribute.Attributes <-------This is where it breaks
Set objRefAttr = objAttributes.getNamedItem("cleintid")
varstatus = objRefAttr.Text
MsgBox varstatus
**********************************************