Unable to Return a String from "Get XML Document Data" Function
I am trying to populate a Script Variable of type string "region" from the script function 'Get XML Document Data'. My XML Data is formatted like below (Also Attached):
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <REGION ID="Pacific">
- <REGION ID="Central">
I need to search the XML Document for the areacode, and have the function return to me what Region that area code exists in.
Example: I do a "Get XML Document Data" where areacode=701, It should return to me region string "Central".
My Get XML Document Data step is as follows:
region = Get XML Document Data (XMLRegions, ":/REGIONS/REGION[AREACODE=areacode]")
I also have tried:
region = Get XML Document Data (XMLRegions, "/descendant::REGIONS/child::REGION[AREACODE='" + RareaCode + "']")
I specified RareaCode as a string variable to see if it didn't work because the XML name was the same as my variable. When I changed it to the above code, it returns to me: U"\n\t\t" instead of null....
region is a type string script variable
areacode is a type string script variable that is set by the callerID to the area code of the caller
When I run through the debug, it just returns null.
I have attached the script and the XML Document. The section of the script with this specific lookup starts after the Welcome Label, and ends before the GeneralQ label.
These are the paths to get to each CCX logs through CLI. They may be helpful if you are having issues accessing RTMT or downloading logs through it.
If you want to download them you have to prefix "file get " and you can add one of the options (re...