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

IPCC Script - Extract XML document data

paulcian_2
Level 1
Level 1

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 4

francis.labelle
Level 1
Level 1

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

francis.labelle
Level 1
Level 1

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

msmalley
Level 1
Level 1

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.

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

Here is what I used. Thanks for all the POSTS

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: