Gretyl's Portal

Heretto Help

Show Page Sections

Map XML Code

Edit the Map XML Code

You can open a map in the Source Editor directly from the Content Library or by using the Content Editor.

Important:

If multiple users collaborate on a resource, Heretto CCMS places a collaboration lock on the topic and the XML code is not editable.

  1. Open a map in the Source Editor by doing any of the following:
    OptionDescription
    To open the Source Editor directly from the Content Library,in the Content Library, right- click a map and select Edit Source.
    To open the Source Editor from the Content Editor,
    1. Double-click a map in the Content Library.

    2. In the Content Editor, hover over a map element and click Edit element properties .
    3. In the element properties pop-up, click the Pencil button.Pencil button in the element properties window

    To open the Source Editor from the Content Editor,
    1. Double-click a map in the Content Library.

    2. In the Content Editor, right-click an element in the map tree and select Edit Element XML.

    Tip: You can edit the XML code of a map element, for example, a chapter with its child topics, by right-clicking the element and selecting Edit element XML.
  2. Optional: Expand or collapse elements by clicking the corresponding Plus icons or Minus icons.
    Tip:

    Collapsing irrelevant elements increases readability and limits distractions.

  3. Edit the XML code.
    Tip:

    The gray line in the scroll bar indicates your cursor position.

  4. Optional: Make your code more readable by clicking Format source .
  5. Click Save.
  6. If the Failed to Save Document window appears, click OK and fix the invalid XML code.

Find and Replace the Map XML Code

You can find and replace the XML code of a map in the Source Editor.

Important:

If multiple users collaborate on a resource, Heretto CCMS places a collaboration lock on the topic and the XML code is not editable.

  1. In the Content Library, right-click a map and select Edit Source.
  2. Press Cmd > F (Mac) or Ctrl > F (Windows).
  3. Search for a term by doing the following:
    1. In the Find field, type in a search term and press Enter.
      Search for <metadata>
      All search results are highlighted.
    2. Optional: Restrict the search to match case by clicking the Match Case button.
    3. Optional: Restrict the search to match whole words only by clicking the Match Whole Word button.
    4. Optional: Enable regular expression in the search by clicking the Use Regular Expression button.
    5. Optional: Restrict the search scope by highlighting the document area that you want to include in the search results, and click the Find in selection button.
  4. If you want to navigate the search results, do any of the following:
    • To navigate to the next result, click the Next match button.
    • To navigate to the previous result, click the Previous match button.
  5. If you want to replace your search results, do the following:
    1. In the Find dialog, click the Toggle Replace mode button.
      The Find dialog dialog expands to the Find and Replace dialog.
    2. In the Replace field, type in a term that would replace the search results.
    3. To replace the selected search result, click Replace button.
    4. To replace all search results, click Replace All button.
  6. Save the file by doing any of the following:
    • If you edit a topic, to save the changes and leave the Edit Source window open, click Save.
    • If you edit a topic, to save the file and close the Edit Source window, click Save & Close.
    • If you edit a map, save changes by clicking Save.
  7. If the Source XML Invalid window appears, do any of the following:
    Important:

    The Source XML Invalid window appears if Heretto CCMS detects that something is wrong with the XML code that you edited. We recommend fixing the invalid XML files immediately because they may result in severe publishing errors. The Invalid XML code is indicated by a red underline and a red rectangle in the scroll bar.

    If you plan to fix the invalid XML code later and you don't want to lose your changes, you can save the invalid XML code. Heretto CCMS notifies you about invalid XML files by displaying the Invalid File icon in the Content Library.

    • To save the invalid XML code, click the OK button.
    • To edit the invalid XML code, click Cancel.