07-17-2011 10:14 AM - edited 03-14-2019 08:14 AM
Hello,
I am trying to use CCX to loop through an XML document with the same path name. The script should pull these values out of XML and into a string array. Below I have included the XML example and what I currently have from a code perspective. Help on this would be great!
<ColorTypes>
<type>RED</type>
<type>YELLOW</type>
<type>GREEN</type>
<type>BLUE</type>
</ColorTypes>
set colorcount = 0
Set color = new String [5]
color[colorcount] = get xml document
TAG LOOP
if color[colorcount] != "" then
increment colorcount
color[colorcount] = get xml document
(Removed error handling)
goto LOOP
The issue is only get the first "type" tag "RED" it never steps to the next type. Is there any way to have it capture all these values into an array?
Thank you!
07-18-2011 12:04 PM
I'd put the colors into an array in the XML( ) and Then use tokenizer to work with the "array"
Sent from Cisco Technical Support iPad App
07-19-2011 03:01 PM
Thanks for the input, I think I found a way to do this with get xml document step VALUE(0)... VALUE(1) etc...
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide