<html>
<head>
<title>Character References</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="Description">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
<tr>
<td valign="top" class="NAME">Character References</td>
<td valign="top" class="COMPATIBILITY">&nbsp;</td>
</tr>
<tr>
<td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
</tr>
<tr>
<td valign="top" colspan="2" class="description">
<span class="PROGRAMLISTING"><pre><strong class="userinput">&amp;#</strong><var class="replaceable">decimal-number</var><strong class="userinput">;</strong>
<strong class="userinput">&amp;#x</strong><var class="replaceable">hexadecimal-number</var><strong class="userinput">;</strong></pre></span>
<p>All XML parsers are based on the Unicode character set, no matter
what the external encoding of the XML file is. It is theoretically
possible to author documents directly in Unicode, but many
text-editing, storage, and delivery systems do not fully support the
Unicode character set. To allow XML authors to include Unicode
characters in their documents' content without
forcing them to abandon their existing editing tools, XML provides
the <emphasis>character
reference</emphasis> mechanism.</p>

<p>A character reference allows an author to insert a
Unicode character by number (either
decimal or hexadecimal) into the output stream produced by the parser
to an XML application. Consider an XML document that includes the
following character data:</p>

<span class="PROGRAMLISTING"><pre>&amp;#xa9; 2002 O'Reilly &amp;#38; Associates</pre></span>


<p>In this example, the parser would replace the character reference
with the actual Unicode character and pass it to the client
application:</p>

<span class="PROGRAMLISTING"><pre>&copy; 2002 O'Reilly &amp; Associates</pre></span>


<p>Character references may not be used in element or attribute names,
although they may be used in attribute values. Note that hexadecimal
character references are case-insensitive (i.e.,
<span class="LITERAL">&amp;xa9;</span> is equivalent to
<span class="LITERAL">&amp;xA9;</span>).</p>
</td></tr>
</table>
</div>
</body>
</html>