Special Characters in XML files

The validated data that you find in the drop-down lists must be entered in the DIRECTORYSETTINGS.XML file. However, certain character strings cannot be contained in an XML file. XML files define five entity references for special characters. In order to use these characters in the drop-down lists, you must substitute them with the entity reference codes. Otherwise the character will be interpreted as part of the XML file. The five entity references are as follows:

Character Entity reference code
& &
> >
< &lt;
" &quot;
' &apos;

The most common time we have found this is when people want to put the ampersand (&) character in the Company or Department name attributes. Here is an example of the text that must be in the department's value tags:

<field id="company" label="Company" attribute="company" visible="true" editable="true" type="dropdown" maxLength="64">
  <value>Somorita Surfboards</value>
  <value>Somorita Water Sports Design &amp; Research Organization</value>
  <value>Bob's Boogie Boards &amp; Smoothie Stand</value>

Keywords: an error occurred while parsing EntityName System.XML.XMLTextReaderImpl.Throw(Exception e) ampersand

Last reviewed: 15 Mar 2020