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 a status that allows edits, since they can be locked.

Note: For most document teams, this means any state within the Authoring cycle. Maps or topics that are not in a status that allows edits, such as those that are not in the Authoring cycle, are skipped.

You must lock the maps and topics for the replace operation to succeed.

Note: You can lock the documents before beginning or allow the IXIA CCMS Desktop to lock them for you during the process.
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.
    Figure: Search and Replace dialog

    Search and Replace
  6. Under Containing text, enter the search string.
    To search recently used text or expressions, click the dropdown 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: Search and Replace prompt


    The Replace Text Matches dialog appears.
    Figure: Replace Text dialog


  9. In the With field, enter your replacement text or select it from the dropdown list.
    The Regular expression checkbox is selected, if you chose this option for your search.
  10. Optional: To review the changes you will make, click Preview.
    Note: You can also apply changes globally without previewing them by clicking OK. However, this option is not ideal, unless you are absolutely certain that the changes will not negatively affect your XML tags and change text you don't want changed.
    The Replace Text Matches dialog box appears.
    Figure: Preview 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. Take one of the following actions:
    • 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.