|
-
Sep 28th, 2006, 09:42 AM
#1
Thread Starter
Lively Member
help with XML
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|