Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

IPCC Script - Extract XML document data

Can anyone tell me how to write the expression to extract the Distance from the following XML output? We are using the Extract XML Document Data step from the scripting language but are unable to actually pull the data out.

<?xml version="1.0" ?>

- <Locations>

<Branch Name="Test">

<Distance>0 Miles</Distance>

<Phone />

<Open_Now>N/A</Open_Now>

<WAV>Location_000.WAV</WAV>

</Branch>

</Locations>

4 REPLIES
Community Member

Re: IPCC Script - Extract XML document data

Look at Example 14-3 of the "CRS Step Editor Online Help" (the help of the CRS editor)

Community Member

Re: IPCC Script - Extract XML document data

Look at Example 14-3 of the "CRS Step Editor Online Help" (the help of the CRS editor)

Community Member

Re: IPCC Script - Extract XML document data

You would need to create an XPATH string variable and set it equal to:

/descendant::Locations/child::Distance

It should return the a string containing "0 Miles"

Hope this helps.

Community Member

Re: IPCC Script - Extract XML document data

"/descendant::Locations/child::Branch[attribute::Seq='" + seq + "']/child::Distance"

Here is what I used. Thanks for all the POSTS

542
Views
0
Helpful
4
Replies
CreatePlease to create content