B-14 Videojet DataFlex 6530 Service Manual - Rev AA
Alternately, if the character is not one of the above and still does not work correctly (e.g any
character with an ASCII code >= 128), you may use a CDATA section. This is done by simply
enclosing the required text with <![CDATA[ ]]>. Reserved xml characters should not be escaped
in the CDATA section.
So to print the text “Español & Français” in a field called “Languages” the XML should contain:
<Field Name=” Languages”><![CDATA[Español & Français]]></Field>
3. White space characters are not printed correctly. White space characters are usually
truncated into a single space, because XML is a free format structure. To overcome this use a
CDATA section as described in 2.
4. The field names are not correct. Ensure that the field names are matched exactly. This
includes the case of each character, and the white space.
5. The ReferenceCiff attribute is present and does not match the name of the CIFF file that is
being used. Ensure that the name in the SEL message matches the ReferenceCiff name.
6. The data is being truncated or characters are missing. Data entered into a user entered field
uses exactly the same validation as is used for user entry. This means that if the field is setup
for “Numeric Only”, then only numbers are allowed in the field, and any other characters are
discarded. The data is also truncated to the maximum length specified within the CIFF file.
Advanced Features
This section covers items such as double byte (Unicode) strings; preserving white space padding
and multiple data object fields and counters.
Unicode CIFF Data Files
In certain applications, it is necessary to enter characters that are not part of the Western
European character set. In order to achieve this, the XML file needs to be encoded in the Unicode
character set. Unicode is a 16-bit character set capable of encoding almost all known characters
and is used as a worldwide character-encoding standard.
To identify the CIFF data file as a Unicode XML file, a processing instruction needs to be added
to the start of the file that reads "<?xml version=”1.0” encoding=”UTF-16” ?>”. So to update a
field with Arabic text:
<?xml version=”1.0” encoding=”UTF-16” ?>
<ImageData>
<Field Name=”SomeText”><![CDATA[???]]></Field>
</ImageData>
The simplest way of creating a Unicode XML file is to create it in Notepad on a Windows
NT/2000/XP system and then in the save dialog, select the encoding as Unicode.
White Space Characters
XML has a free format structure which can lead to problems when the field data has to contain
multiple white space characters (space, tab and return characters). Where there is a run of
consecutive white space characters, an XML parser usually truncates this to a single space. In
order to avoid this, wrap the text in a CDATA section.
The following examples show what would be printed with and without a CDATA section.
1. <Field Name=”SomeText”>A 0001</Field> would print “A 0001”.
2. <Field Name=”SomeText”> <![CDATA[A 0001]]></Field> would print “A 0001”.