Let's suppose that in a poorly-tagged document, you want to replace dozens of literal elements containing word "XXE" by the equivalent abbrev elements. How would you do that using XMLmind XML Editor, given the fact that this application only has a text search/replace facility?
The answer is: perform the editing operation only once as you would do it normally, but make sure to record your actions using the ToolsRecord Macro facility.
After the macro —that is, the sequence of commands you have invoked— has been recorded, it becomes possible to “replay” this macro as many times as needed to.
In the case of the above example, the sequence of commands to be recorded is:
Once the macro has been recorded, you'll have to invoke it repeatedly until all the occurrences of literal element containing word "XXE" have been replaced by abbrev elements. This can be done by pressing Esc p (p like play), which is quicker than selecting menu item ToolsRecord Macro Replay Macro.
While recording a macro, you can use, not only keyboard shortcuts, but also any part of the user interface of XMLmind XML Editor: menu item, toolbar button, right-side pane, etc. This means that you can work almost normally while you are recording macro. There are notable exceptions though. Using any of the following commands will automatically cancel the recording of the macro: Undo, Redo, Repeat and any command bound to a mouse click (for example, double-click to select a word).
Also note that commands such as FileSave are simply not recorded because such commands do not contribute in modifying the document.
While it's certainly possible to click on menu items, toolbar buttons, etc, while recording a macro, this facility is meant to be used with the keyboard alone.
|Esc m (m like macro)||Start/stop recording a macro.|
|Esc q (q like quit)||Cancel the recording.|
|Esc p (p like play)||Execute (“replay”) the macro.|
|Esc f (f like find)||Find element.|
|Esc s (s like search)||Find some text.
Displays a simple text search dialog box (see below) which is more convenient to use in the context of macro recording than the Search right-side pane.
|Esc x (x like execute)||Execute a command by specifying its name and its parameter.
Example: execute command "selectText" with parameter
The Toolsbelow) is useful when there is no other way to execute a command, for example, when the command has no keyboard binding or when the command only has a mouse binding. (Remember that using your mouse inside the document view will cancel the recording of the macro.)Execute Command dialog box (see
The commands which can be executed this way are all documented in XMLmind XML Editor - Commands.