Chapter 13. Text-mode editing

Table of Contents
13.1. Syntax highlighting
13.2. Validating in text mode

It is possible (and sometimes necessary) to edit a document in text mode. This situation can occur e.g. when you receive a malformed or invalid XML document and epcEdit is not capable of fixing the document structure automatically. In a situation like this, epcEdit will offer to open the document in text mode.

Text mode is very different from epcEdit's normal editing mode: In text mode, epcEdit does not distinguish data from markup and no structural editing rules are enforced. The complete document text including the text representation of the markup is displayed and can be edited without any restrictions.

You can switch to text mode by following these steps:

  1. Select View->Text mode from the main menu.

After switching to text mode, the check mark to the left of the Text mode menu item in the View menu will be activated. To leave text mode and continue normal editing of your document, just select View->Text mode again to turn the check mark off and to return to epcEdit's normal editing mode.

13.1. Syntax highlighting

To simplify the distinction between data and markup even in text mode, epcEdit uses syntax highlighting to distinguish between text that might be considered markup and text that is data.

The text mode highlighting is based on regular expressions (see Regular expressions) for determining how the parts of your document should be displayed.