hi,

I have an xml file which may or may not have information in a particular node.
I am trying to assign the value of this element (which will either be a 1 or nothing) to a variable called strTest.

This works fine if the element contains a "1" , however if the element is empty i get an automation error (clearly cause you cannot assign an empty node.typedValue to a string.

Can any1 suggest how i can ckeck to see if the node.typedValue is a "1" and if so to assign it to a string, but if its empty to assign a "0" to the string

or perhaps using a 1,0 boolean


For i = 0 To nodes.Length - 1
strTest (nodes.NextNode.selectSingleNode("REASON").nodeTypedValue)
Next

thanks in advance