mrduckers
asked on
selectsingleNode object required error - how do I check it is valid
Using the following code, when the XML markup does not find I get an error
Object required: '[object]'
How do I first check that the 3 strings are valid before tryign to make them objects and use them to overcome that error.
If not objXML.parseError.errorCod e <> 0 then
image = objXML.selectsingleNode("/ dsp/result /domain/do main-listi ng/hybrid- items/stor e-offer/of fer-image" ).text
title = objXML.selectsingleNode("/ dsp/result /domain/do main-listi ng/hybrid- items/stor e-offer/of fer-name") .text
url = objXML.selectsingleNode("/ dsp/result /domain/do main-listi ng/hybrid- items/stor e-offer/of fer-url"). text
end if
Thanks,
Object required: '[object]'
How do I first check that the 3 strings are valid before tryign to make them objects and use them to overcome that error.
If not objXML.parseError.errorCod
image = objXML.selectsingleNode("/
title = objXML.selectsingleNode("/
url = objXML.selectsingleNode("/
end if
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.