Guest Frankk Report post Posted 09/03/2006 02:40 PM Would someone be able to provide an example of how to send a request and parse out multiple returned results form the google api? http://api.google.com/GoogleSearch.wsdl I want to allow a caller to search google and TTS one result then ask the user if they want to hear the next result and keep going until the results list is complete. I have seen the examples of one result on the weather example but this has multiple results and I need to keep looping through the results??? Thanks for any assistance. Share this post Link to post
SupportTeam Report post Posted 09/03/2006 11:31 PM Just store the multiple returned results in Result Variables which as one of the components of their name have a numeric index. ie: create vars like these: $RV[MyValue_1] $RV[MyValue_2] $RV[MyValue_3] $RV[MyValue_4] etc... And when it comes the time to read the information back to caller have a loop in the script which in each iteration of the loop increases some counter (say $RV[MyCounter]) by one and use the counter to retrieve the current information element, like this: $RV[MyValue_$RV[MyCounter]] One of the examples in the help file's entry on Evaluate Expression module has an example of how to increment a counter in a loop, see: http://www.voiceguide.com/vghelp/html/modEvalExpr.htm Share this post Link to post