Sending Special Characters

There are some special characters that are used by the XML syntax. If used within elements and attributes they needed to be escaped or encapsulated. There a 2 ways to handle these.

attention

Not all special characters are allowed. Please refer to the XML schema files for more information.


Replacing characters

The preferred method is to replace these by the corresponding XML notation:

Character XML notation
< &lt;
> &gt;
& &amp;
" &quot;
' &apos;

Most frameworks do this replacement automatically.

Example for article-description “Black & White”:

Copy
Copied
<item article-number="1">
      quantity="2"  
      unit-price-gross="17.40"  
      tax-rate="19">Black &amp; white</item>

Using CDATA

As an alternative you can encapsulate the element with <![CDATA[ ... ]]>.

Example for article-description “Black & White”

Copy
Copied
<item article-number="1">
      quantity="2"  
      unit-price-gross="17.40"  
      tax-rate="19"><![CDATA[Black & White]]></item>
attention

Note: This only works within elements, not within attributes.

danger

Don't use CDATA for credentials.

Handling of umlauts

Umlauts have to be sent as they are (ä, ö, ...). Escaping for these characters is not recommended.

If an escaping is necessary for some reason, please use UTF-8 escaping.

Examples

Character Decimal Hexadecimal
ü &#252; &#xFC;
Ü &#220; &#xDC;
ö &#246; &#xF6;
Ö &#214; &#xD6;
... ... ...
danger

Please do not use HTML escaping (&uuml; for ü). HTML escaping will cause type mismatches and encoding errors.