<html>
<head>
<title>XML Declaration</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">XML Declaration</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">&lt;?xml version="</strong><var class="replaceable">version_number</var><strong class="userinput">" </strong>[<strong class="userinput">encoding="</strong><var class="replaceable">encoding-name</var><strong class="userinput">"</strong>][<strong class="userinput">standalone="</strong><var class="replaceable">yes</var>|<var class="replaceable">no</var><strong class="userinput">"</strong>]<strong class="userinput">?&gt;</strong></pre></span>
<p>The XML declaration
serves several purposes. It tells the parser what version of the
specification was used, how the document is encoded, and whether the
document is completely self-contained or not.</p>

<tip id="xmlnut3-CHP-21-NOTE-136" role="ora">
<p>If you need to create an XML document that takes advantage of XML 1.1
features, you need to set the <span class="LITERAL">version</span>
pseudo-attribute to 1.1:</p>

<span class="PROGRAMLISTING"><pre>&lt;?xml version="1.1"?&gt;</pre></span>
</tip>


<p>The XML declaration, if included, must be the first thing that
appears in an XML document. Nothing, except possibly a Unicode
byte-order mark, may appear before this structure's
initial <span class="LITERAL">&lt;</span> character. If no XML declaration is
present, the document is assumed to conform to the XML 1.0
Recommendation.</p>
</td></tr>
</table>
</div>
</body>
</html>