Altova XMLSpy 2025 Professional Edition

Icons and shortcuts

 

Command

Icon

Shortcut

Replace

icFindReplace

Ctrl+H

 

Description

The Replace command in Text View and Grid View causes the Find/Replace dialog (screenshot below) to appear. In this dialog, you can specify that one string be found and replaced with another string. For a description of the options for the Find string, see the Find command. You can replace each item individually, or you can use the Replace All button to perform a global find-and-replace operation.

 

To replace a text string, do the following:

 

1.Press Ctrl+H (or select the menu command Edit | Replace) to open the Find/Replace dialog (screenshot below). (Alternatively, you can switch to Replace mode of the Find/Replace dialog by clicking the down-arrow button at the top left of the dialog.)

TextViewReplace

2.Enter the string to be replaced in the Find field, and enter the new string in the Replace field. The number of text matches to replace and the index of the currently selected match is displayed below the Replace field. Also, the locations of matches are indicated in the scroll bar by beige markers (see Searching for text in a document above for more information). For example, the screenshot above shows that there are five text matches for the string type, and that the third of these matches is currently selected.

3.The Replace Next and Replace All buttons are located to the right of the Replace field. If you click Replace Next, one of the following happens: (i) If the cursor is located adjacent to a match or inside a match, then the match is replaced; (ii) if the cursor is located outside a match, it jumps to the next match; click Replace Next to replace this match. Click Replace All to replace all matches.

 

Note the following points:

 

To replace text within a selection—rather than the entire document—do the following: (i) Mark the selection; (ii) Toggle on the Find in Selection option to lock the selection; (iii) Enter the Find and Replace text strings; (iii) Click Replace Next or Replace All as required. To replace text within another selection, unlock the current selection by toggling off  the Find in Selection option, then make the new selection and toggle on the Find in Selection option to lock the new selection.

To undo a replace action, press Ctrl+Z or select Edit | Undo.

 

 

Note:When using the Replace All command, each replacement is recorded as a single operation, so Replace All can be undone step-by-step.

 

© 2018-2024 Altova GmbH