Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Escaping characters





There are two ways to escape characters which can't be used in XML files:
  • Use the CDATA regular XML way to escape content
  • Use the "esc" element in the articles content and configure the generation to parse this element

Use CDATA escaping

Characters such as < and > can't be used in the XML file. It is possible to use HTML escaped characters for:
  • < escaped by &lt;
  • > escaped by &gt;


Furthermore, it is possible to escape characters by using the regular XML CDATA way for escaping characters. For example:
      this is a line with a <![CDATA[<]]>

Use the esc element

Another way to escape characters is to use the "esc" element in articles, and specify that the characters can be escaped in the configuration file:
  • Set the supportEscaping property in the configuration file
  • Use the "esc" element in articles

Example

      this is a line with a <esc text=\"<\" />
The result will be as the XML file have been set as:
      this is a line with a <![CDATA[<]]>
Note that it will only be processed if the "supportEscaping" has been set.

See also


Categories: syntax

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.