Xml Encoding - Cisco OL-18696-01 Development Manual

Unified ip phone services application development notes
Table of Contents

Advertisement

XML Considerations
.
Table 2-5
Character
&
"
'
<
>
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.
This behavior is NOT compliant with XML standards, which specify UTF-8 as the default encoding, so
Note
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
on page
Cisco Unified IP Phone Services Application Development Notes
2-20
Escape Sequences for Special Characters
Name
Ampersand
Quote
Apostrophe
Left angle bracket
Right angle bracket
5-5.
Chapter 2
Escape Sequence
&amp;
&quot;
&apos;
&lt;
&gt;
"HTTP Encoding Header Setting" section
CiscoIPPhone XML Objects
OL-18696-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

7900 series

Table of Contents