J
joe
I am having problems checking for the value of an XMLDOM object .
Lets say my XMLDOM object was successfully created as objXMLDoc, and that
has several nodes on it. In the case of a VBScript loop like below:
'-------------------
For x = 1 To 10
Set oItemPrice = objXMLDoc.selectSingleNode("//Item[x]/Price")
'--- conditional stuff that fails here
Next
'-------------------
some of the Items don't have a price, therefore the object oItemPrice will
fail at some point. So I want to check for this failure, but everything I do
gives me errors.
Examples:
1. If not oItemPrice Then
2. If oItemPrice.lenght = 0 Then
3. If oItemPrice = empty or oItemPrice = "" or isnull(oItemPrice) Then
4. If not (oItemPrice) Then
I really don't know what to do. Most errors are like:
" Object doesn't support this property or method"
Any help is appreciated.
Lets say my XMLDOM object was successfully created as objXMLDoc, and that
has several nodes on it. In the case of a VBScript loop like below:
'-------------------
For x = 1 To 10
Set oItemPrice = objXMLDoc.selectSingleNode("//Item[x]/Price")
'--- conditional stuff that fails here
Next
'-------------------
some of the Items don't have a price, therefore the object oItemPrice will
fail at some point. So I want to check for this failure, but everything I do
gives me errors.
Examples:
1. If not oItemPrice Then
2. If oItemPrice.lenght = 0 Then
3. If oItemPrice = empty or oItemPrice = "" or isnull(oItemPrice) Then
4. If not (oItemPrice) Then
I really don't know what to do. Most errors are like:
" Object doesn't support this property or method"
Any help is appreciated.