Iterating through an xml with prompts
Posted: Thu Mar 14, 2013 6:59 pm
As part of the http response using the data tag, I receive an xml like
<Addresses>
<entry>205 W LAUREL ST, Glendale</entry>
<entry>20261 E COVINA BLVD, Charter Oak</entry>
<entry>201 E MAGNOLIA BLVD, Burbank</entry>
<entry>2010 ZONAL AVE, Los Angeles</entry>
<entry>2000 W EMPIRE AVE, Burbank</entry>
</Addresses>
The no of entry elements is dynamic.
At IVR interface, I need to iterate these entries to choose one of them
Like
Press 1 for "205 W LAUREL ST, Glendale"
Press 2 for "20261 E COVINA BLVD, Charter Oak"
Press 3 for
....
I have looked into foreach tag, but how do I keep track of the count 1, 2, 3...
Please advise.
<Addresses>
<entry>205 W LAUREL ST, Glendale</entry>
<entry>20261 E COVINA BLVD, Charter Oak</entry>
<entry>201 E MAGNOLIA BLVD, Burbank</entry>
<entry>2010 ZONAL AVE, Los Angeles</entry>
<entry>2000 W EMPIRE AVE, Burbank</entry>
</Addresses>
The no of entry elements is dynamic.
At IVR interface, I need to iterate these entries to choose one of them
Like
Press 1 for "205 W LAUREL ST, Glendale"
Press 2 for "20261 E COVINA BLVD, Charter Oak"
Press 3 for
....
I have looked into foreach tag, but how do I keep track of the count 1, 2, 3...
Please advise.