Friday 7 November 2014

XML Declaration


XML declaration is a processing instruction, that identifies the document as XML.

Syntax
<?xml
 version="version_number"
 encoding="encoding_declaration"
 standalone="standalone_status" ?>

Attribute
Possible Value
Description
version
1.0 or 1.1
Specifies the version of XML document.
encoding
UTF-8, UTF-16, ISO-10646-UCS-2, ISO-10646-UCS-4, ISO-8859-1 to ISO-8859-9, ISO-2022-JP, Shift_JIS, EUC-JP
Character encoding supports by XML document.
standalone
yes, no
'yes' represents XML has internal DTD. 'no' represents XML document is linked to an external DTD.

Note :
1.           The XML declaration has no closing tag, that is </?xml>
2.           In XML 1.0, the XML Declaration is optional. But from XML 1.1, XML declaration is mandatory.


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment