XML Declaration | |
<?xml version="version_number" [encoding="encoding-name"][standalone="yes|no"]?> 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. If you need to create an XML document that takes advantage of XML 1.1 features, you need to set the version pseudo-attribute to 1.1: <?xml version="1.1"?> 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 < character. If no XML declaration is present, the document is assumed to conform to the XML 1.0 Recommendation. |