cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
216
Views
0
Helpful
0
Replies

XPATH to select a random node

dbonagir
Cisco Employee
Cisco Employee

Hi

I'm trying to play a random prompt from a list of available prompts.

I recognise that the 'Generate Prompt' step can achieve this but my prompts in question are going to be sitting in an XML file (see below)


<?xml version="1.0" encoding="ISO-8859-1"?><Config xml:lang="en-gb">
<Campaigns>
<Campaign ID="1">
<P ID="1">Paul\2 Welcome Prompts\paul2000.wav</P>
<P ID="2">Paul\2 Welcome Prompts\paul2001.wav</P>
<P ID="3">Paul\2 Welcome Prompts\paul2002.wav</P>
<P ID="4">Paul\2 Welcome Prompts\paul2003.wav</P>
<P ID="5">Paul\2 Welcome Prompts\paul2004.wav</P>
</Campaign>
<Campaign ID="2">
<P ID="1">Paul\2 Welcome Prompts\paul2000.wav</P>
<P ID="2">Paul\2 Welcome Prompts\paul2001.wav</P>
</Campaign>
</Campaigns>
</Config>


Can someone advise on the best way to select an element at random using as few steps as possible?

Many thanks

Rob

0 Replies 0