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

XML Document returns no matches

voiceops
Level 1
Level 1

I'm using CRS 3.5 (Queue Manager IP IVR) and in a few scripts I'm reading an XML document to get some data.

What can I do when I don't get any data back?

Is there an exception I can capture?

thanks

1 Accepted Solution

Accepted Solutions

If you debug the script, and a match was not found, what does the HMO_TFN variable have for a value immediately after the Extract XML Doc Data step?

View solution in original post

4 Replies 4

Jonathan Schulenberg
Hall of Fame
Hall of Fame

There are a few document exceptions which you can use. They typically catch when there is a syntax error in the XML for example. If a specific value had nothing in it, the variable should be null. You can use a simple If statement at that point.

Thanks for the reply, I used an If statement but it still doesn't work.

I'm using an "Extract XML Doc Data" step with xpath "//SSC/DNIS[ENTITY=" + Entity_ID + "]/TFN".

If there's a match it copies the result into a variable called HMO_TFN which I then pass through a number of variables using the java substring(x,x) class; but if it doesn't find a match it fails... but it fails at the first instance of the substring(x,x) though and not really after the extract xml object.

If you debug the script, and a match was not found, what does the HMO_TFN variable have for a value immediately after the Extract XML Doc Data step?

I ended up using a DocumentException and that did it.

thanks for your help