2-20
Cisco Unified IP Phone Services Application Development Notes
OL-18696-01
Chapter 2 CiscoIPPhone XML Objects
XML Considerations
.
Escaping text can be tedious, but some authoring tools or scripting languages can automate this task.
XML Encoding
Because the phone firmware can support multiple encodings, the XML encoding should always be set in
the XML header.
If the XML encoding header is not specified, the phone will default to the encoding specified by the
current user locale.
Note
This behavior is NOT compliant with XML standards, which specify UTF-8 as the default encoding, so
any UTF-8 encoded XML object must have the encoding explicitly set for the phone to parse it correctly.
The encoding value specified in the XML header must match one of the encodings provided by the IP
Phone in its Accept-Charset HTTP request header, as shown in the example below.
Example
The following examples illustrate UTF-8 and ISO-8859-1 encoding, respectively:
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="iso-8859-1" ?>
For details on setting HTTP header encoding settings, see the
“HTTP Encoding Header Setting” section
on page 5-5
.
Table 2-5
Escape Sequences for Special Characters
Character
Name
Escape Sequence
&
Ampersand
&
“
Quote
"
'
Apostrophe
'
<
Left angle bracket
<
>
Right angle bracket
>