07-30-2004 08:30 AM - edited 03-13-2019 05:50 AM
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
07-30-2004 09:57 AM
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.
07-30-2004 12:26 PM
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
08-01-2004 07:21 PM
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.
Hope it helps.
Regards
Venkat
08-03-2004 06:02 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide