Hello,
I'm a beginner UltraEdit user and I'd like to share a doubt I have writing a script. I'm using UltraEdit 16.30.0.1003 version.
This script does massive changes in a folder that contains a lot of XML files. The changes I've made at the moment are simple like:
or
I also do another changes that I've made using prompt function like:
I'd like to know if I can made a replace in an XML tag using the content I find at another ones. For example, I would like to set the content of a new tag <owner></owner> using the content I find in the tags <firstname> and <lastname>.
For example, if i have following tags:
I want to append a new tag <owner> with the concatenation of these tags:
But I don't know how to extract this data to concatenate it.
My script starts as follows:
Thank you very much for your comments and sorry for my beginner doubt.
Greetings
I'm a beginner UltraEdit user and I'd like to share a doubt I have writing a script. I'm using UltraEdit 16.30.0.1003 version.
This script does massive changes in a folder that contains a lot of XML files. The changes I've made at the moment are simple like:
Code: Select all
UltraEdit.frInFiles.replace("<bookin>", "<booking>");
Code: Select all
UltraEdit.frInFiles.replace("<booking>We assume", "<booking>We have");
Code: Select all
var cust = UltraEdit.getString("Please Enter a customer id:",1);
For example, if i have following tags:
Code: Select all
<firstname>John</firstname>
<lastname>Spencer</lastname>
Code: Select all
<firstname>John</firstname>
<lastname>Spencer</lastname>
<owner>John Spencer</owner>
My script starts as follows:
Code: Select all
UltraEdit.ueReOn();
UltraEdit.outputWindow.showWindow(true);
UltraEdit.frInFiles.matchCase = true;
UltraEdit.frInFiles.matchWord = false;
UltraEdit.frInFiles.regExp = true;
UltraEdit.frInFiles.useOutputWindow = true;
UltraEdit.frInFiles.logChanges = true;
UltraEdit.frInFiles.unicodeSearch = false;
UltraEdit.frInFiles.directoryStart = "C:\\amd\\";
UltraEdit.frInFiles.searchInFilesTypes = "*.XML";
//multiple replace statements in the way I've displayed above...
Greetings