XML declaration
The XML declaration specifies the version of XML being used.
You may need to change this value for a future version of XML. It
can also contain an encoding declaration and a standalone document
declaration. From the pop-up menu, you can edit the declaration,
and, if the document is well-formed, delete it. If you have deleted
the XML declaration, you can insert one from the Insert Before item
on the pop-up menu for the next item in the template.
Encoding declaration
The encoding declaration specifies the character-set encoding
used in the document, such as UTF-16 or ISO-10646-UCS-4.
If there is no encoding declaration, the value defaults to
UTF-16LE encoding in ASCII environments. In DBCS environments, the
default is the default system encoding on the computer where the
XML document is generated. This ensures that the document displays
correctly as a plain text file. However, since the DBCS data is
serialized to Unicode, XML documents that use UTF-16LE, UTF-16 Big
Endian, or UTF-16 Little Endian can all be parsed or generated correctly
on DBCS systems.
Several other encodings are available, including ASCII, UCS4
Big Endian, UCS4 Little Endian, EBCDIC code pages IBM037 and IBM1140,
ISO Latin–1, and Latin 1 Windows (code page 1252). You
can select these values from a drop-down list box in the XML Declaration
dialog box.
Standalone document declaration
The standalone document declaration specifies whether the
document contains no external markup that needs to be processed
and can therefore stand alone (Yes), or that there are, or might
be, external markup declarations in the document (No). The value
in the default template is No, and if there is no standalone document
declaration, the value is assumed to be No.
Example
This is an XML declaration that specifies XML version 1.0,
UTF-16LE encoding, and that the document can stand alone:
|
1 |
<?xml version="1.0" encoding="UTF-16LE" standalone="yes"?> |