Search and replace the XML content of a map

You can search and replace XML text strings within the topics of a map.

Maps and topics must have an editable status (that is, they can be locked).The maps and topics must be locked for the replace operation to succeed. You can lock the documents before beginning or allow the IXIA CCMS Desktop to lock them for you during the process.

Note: For most document teams, this means any state within the Authoring cycle. Maps or topics that are not in a lockable state, that are not in the Authoring cycle for example, are skipped.
CAUTION: This feature is capable of altering the XML code in your documents and making your documents invalid.

To replace a particular text string across all topics of a map:

  1. Open the DITA perspective.
  2. Open a map in the DITA Map view.
  3. (Optional): To search only certain topics in the map, do the following:
    1. Select them
    2. Under Applies to, click Selection.
  4. In the DITA Map view, click the Menu button (Down arrow).
  5. Select Search and Replace.
    The Search and Replace dialog box appears:
    Figure: Search and Replace

    Search and Replace
  6. Under Containing text, enter the search string.
    To search recently used text or expressions, click the drop-down list under Containing text and make a selection.
    Note: Your search string can include wildcards, but it cannot include operators.
  7. (Optional): If desired, select one or more Options:
    • Case sensitive to find only text that matches the case in your search string.
    • Whole word to find only whole words that match the search string. (If this is selected, a search for "cat" would ignore the word "catastrophe".)
    • Regular expression to use Regular Expressions (RegEx) to find a codified pattern. If this option is not selected, the [ ] characters, if used, will be interpreted as wildcards.
  8. Click Replace.

    If any of the target documents are unlocked, the Search And Replace - Unlocked Documents confirmation window appears. Click Yes to continue with the replace operation.

    Figure: Found Unlocked Documents


    The Replace Text Matches dialog appears:
    Figure: Replace Text


  9. In the With field, enter your replacement text or select it from the drop-down list.
    The Regular expression checkbox is selected if you chose this option for your search.
  10. (Optional): To review the changes you're about to make, click Preview.
    Note: You can also apply changes globally without previewing them by clicking OK. However, this option is not recommended unless you are absolutely certain that the changes will not negatively affect your XML tags and/or change text you don't want changed.
    The Replace Text Matches dialog box appears:
    Figure: Previewing text changes

    Previewing text changes
  11. Under Changes to be performed, select the first change in the list.
    The search string is highlighted under Original Source, and the replacement string is highlighted under Refactored Source.
  12. Do one of the following:
    • If the change is acceptable, do nothing and continue previewing all changes in the list until complete.
    • If the change is not what you wanted, under Changes to be performed, clear the checkbox for that particular replacement.
  13. Click OK when you are finished.

The replacement action is carried out in the selected documents.