Edit the XML source

In the Oxygen editor, if you want to edit the structure and content in your document as only XML code, you can switch to a mode where you only see text surrounded by tags. This is helpful if you only want to focus on editing the document structure and don't need to see images.

Tips and tricks

  • If you make a coding error, you only see a warning when you try to save the component.

    • You can fix the error in Edit XML source mode and try again to save your changes.
    • You can also Switch to Author mode and use the right panel option for validation.

      The Validation pane provides you with a More details link to learn more about the XML language rules.

      Check for errors in the Validation pane

To edit the XML source:

  1. Click Components_TopMenuOpt Components.
  2. In the Folders pane, navigate to the folder where you've saved the component.
  3. In the Components pane, select the component you want to open.
  4. To open the file in the Oxygen editor, double-click the component.
    You can also open a component in the following ways:
    • To select the row, click it, then right-click and select Edit...
    • To select the row, click it, then click and select Edit...
  5. By default Oxygen opens a component for editing in Author mode. To switch to Edit XML, do one of the following:
    • In the editor, click and then select Edit XML Source
    • Use the keyboard shortcut keys Alt+fn+F5
  6. You can edit any of the code or text directly in the center pane.

    For help writing XML code for a DITA topic, refer to Oxygen's XML guide: Introduction to DITA 1.3

  7. Optionally, if you need to undo a change, in the toolbar, click Undo.

    The Oxygen editor allows you to undo up to 200 changes.

  8. Optionally, if you to re-do a change, in the toolbar, click Redo.
  9. You can hide attribute tags by clicking Hide Ids.

    Important notes:

    • When attribute IDs are hidden, element tags and link references are still displayed.

    • If you manually type in code to add an attribute after you Hide Ids, the attribute code is displayed until you Save and Submit your changes and re-open the component to hide the newly added attribute code.

    • You can select the Show Ids button to show attribute IDs again.

  10. To save your changes locally and keep the component open for editing, select Save.
  11. To save your changes to the database and close the component, select Save and Submit.
  12. To make changes to the document in a visual editor, select Switch to Author mode.