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.
Previous Page | Page 9 of 36 | Next Page |
- 1. XHTML MP (XHTML Mobile Profile) Introduction
- 2. Development of Wireless Markup Languages
- 3. Advantages of XHTML MP
- 4. WML Features Lost in XHTML MP
- 5. Syntax Rules of XHTML MP
- 6. XHTML MP MIME Types and File Extension
- 7. XHTML MP Document Structure
- 8. XHTML MP Generic Metadata
- 9. Comments in XHTML MP
- 10. Line Breaking in XHTML MP
- 11. XHTML MP Horizontal Rules
- 12. XHTML MP Headings
- 13. Font Style in XHTML MP
- 14. XHTML MP Preformatted Text
- 15. XHTML MP Lists
- 16. XHTML MP Images
- 17. XHTML MP Tables
- 18. Anchor Links in XHTML MP
- 19. XHTML MP Selection Lists
- 20. XHTML MP Input Elements
- 21. Submitting Form Data to the Server in XHTML MP