Link to home
Start Free TrialLog in
Avatar of mrduckers
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.errorCode <> 0 then
  image = objXML.selectsingleNode("/dsp/result/domain/domain-listing/hybrid-items/store-offer/offer-image").text
  title = objXML.selectsingleNode("/dsp/result/domain/domain-listing/hybrid-items/store-offer/offer-name").text
  url = objXML.selectsingleNode("/dsp/result/domain/domain-listing/hybrid-items/store-offer/offer-url").text
end if

Thanks,
ASKER CERTIFIED SOLUTION
Avatar of B_Dorsey
B_Dorsey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial