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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

re-write an xml file

I am trying to get the script to rewrite a value in an xml file based on the value of a variable.

so if a user presses 1 in sets the variable to "Holiday" then it should change the value in the xml file to "holiday", currently the script just clears the contents of the xml file.

any help would be great


  • Contact Center

Re: re-write an xml file

Unfortunately, I don't have the IPCCX 4.x editor available. However, the Text Substitution step takes keywords in a template XML file (keywords begin and end with a %). The resultant file (after substitutions) can be written to a different file.

So, the process would be to read the current values from the the state.xml file, and use the template to make the necessary substitutions.

Have a look at the State_Check and State_Update examples in the Script Repository:

I've used this technique to open and close CSQs outside of the normal call flow, and as a flag to decide whether a "message of the day" should be played.