Forum Discussion
AlexKaras
15 years agoCommunity Hero
Hi Tanya,
I went through the help for EvaluateXPath() and the code you've provided and it seems to me that the help topic should be corrected.
The case is that the Declaration section of the help states that the return value for EvaluateXPath() may be "an array, object or null Variant value". However, according to the following description, it looks like that EvaluateXPath() always returns the array (that looks correct) and it is given array's element that might contain either object or value depending on what XPath was searching for.
The statement that EvaluateXPath() may return an object may cause problems for those who use VBScript for their tests, as in this case they must first figure out what is the type of returned value - object (so the Set keyword must be used) or array (simple assignment works in this case).
So I think that the help should be corrected to indicate that the returned value for EvaluateXPath() is an array (or null?) and then explain that the array element's value may be object or value (or null if nothing was found).
Thoughts?
I went through the help for EvaluateXPath() and the code you've provided and it seems to me that the help topic should be corrected.
The case is that the Declaration section of the help states that the return value for EvaluateXPath() may be "an array, object or null Variant value". However, according to the following description, it looks like that EvaluateXPath() always returns the array (that looks correct) and it is given array's element that might contain either object or value depending on what XPath was searching for.
The statement that EvaluateXPath() may return an object may cause problems for those who use VBScript for their tests, as in this case they must first figure out what is the type of returned value - object (so the Set keyword must be used) or array (simple assignment works in this case).
So I think that the help should be corrected to indicate that the returned value for EvaluateXPath() is an array (or null?) and then explain that the array element's value may be object or value (or null if nothing was found).
Thoughts?