7.2. XML Declaration and
Character Encoding
All
XHTML MP documents are XML documents. So, there is an XML declaration
at the start. The XML declaration specifies the XML version of the
document. The character encoding of the document can also be
specified here, like this:
<?xml
version="1.0" encoding="UTF-8"?>
The
above line states that the XML version of the XHTML MP document is
1.0 and the character encoding is UTF-8. If the character encoding of
the XHTML MP document is UTF-8 or UTF-16, the encoding
attribute can be omitted.
The
XML declaration is not a compulsory component in XHTML MP. However,
problems may occur in some WAP browsers if the XML declaration is
omitted. For example, some Sony Ericsson WAP browsers make use of the
XML declaration to distinguish XHTML MP documents from IHTML (a
proprietary markup language defined by NTT DoCoMo) documents when the
MIME type received is text/html: If the document contains the XML
declaration, it is an XHTML MP document, otherwise it is an IHTML
document.
Feedback Form (ExpandCollapse)
|
|