Documentation Center

Setting format properties for XML-Letter - example

An example of creating a parser rule to format text inside a tag pair when the document is opened in the Editor. We use the example file type XML-Letter, and the file example-xml-file-letter.xml. The tag pair is <emphasis>...</emphasis>.

About this task

By default, <emphasis> tags are not shown but text within these tags is displayed in bold.

To download the example XML file example-xml-file-letter.xml see the topic Downloading the Example Files.

Procedure

  1. Create the XML file type XML-Letter.
  2. In the Parser rules for file type XML-Letter, select the <emphasis> element and click Edit to display Edit Parser Rule.
  3. Under Properties, ensure that Tag type is inline, and click Edit next to the Formatting box.
    The Formatting dialog box is displayed.
  4. Under Style, Bold, choose Activate, and click OK to return to the Edit Rule dialog box.
  5. Click Advanced to display Advanced Tag Settings.
  6. Select Tags represent formatting only and can be hidden in the editor.
  7. Click OK until you have exited all dialog boxes.

    When you set the formatting properties as described above, in the Editor, open the file example-xml-file-letter.xml. Note that all <emphasis> elements are formatted in bold.