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

Text Substituton For Keywords

graeme-watson
Level 1
Level 1

Hi,

I am trying to write a variable to an xml file using the Text Substituton For Keywords step however it is not working.

The script does not seem to match my keyword and the resulting file from the Write Document step is an exact copy of the original file I read in using the create file Document step.

Does anyone have an example script I can use or can offer some suggestions?

Thanks

Graeme

4 Replies 4

mkenney
Level 1
Level 1

Are you doing the procedure similar to the following?

1. Create file document: Read in the master XML document from disk to a document variable. This would be the document containing the % around the keyword value you want to substitute.

2. Text substitution step: perform your substitution from the master document variable into the newly created document variable with whatever keyword you are using.

3. Write new document: use newly created document to write the new file to disk.

Thanks for your reply.

The master xml file does not have % around the keyword only the keyword itself - I think that is what I am missing.

I will try again using the % signs - I take it these are required as part of the predefined

template the Step Reference documentation mentions.

Is there an example of the predefined

template anywhere?

Thanks

Hi,

Take a look at the below URL - Cisco CRA Applications Developers Guide helps you to use Editor to develop a wide variety of interactive scripts. Creating Web-Enabled Scripts gives you an idea about usage of Text Substitution for Keywords step.

http://www.cisco.com/univercd/cc/td/doc/product/voice/sw_ap_to/apps_3_0/english/admn_app/develop/script.htm

Hope it helps.

Regards

Venkat

Here is an example I have used called "Manualholiday.xml" and the kayword is "manualSetting" The XMLversion line cannot have any blank lines above it in the file. Good luck.

%manualSetting%