Prolog refers to the first two lines of our "Hello World" WML example:
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
Every WML document starts with the prolog. The first line is the XML declaration and the second line is the DOCTYPE declaration.
The prolog components are not WML elements and they should not be closed, i.e. you should not give them an end tag or finish them with />.
3.3. XML Declaration and Character Encoding
All WML 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 WML document is 1.0 and the character encoding is UTF-8. If the character encoding of the WML document is UTF-8 or UTF-16, there is no need to declare the character encoding as it can be detected automatically.
Note that there should have no whitespace before the XML declaration. If not, some WAP browsers or WAP gateways cannot process the WML file.
|Previous Page||Page 3 of 50||Next Page|
- 1. WML (Wireless Markup Language) Introduction
- 2. WML Deck and Card
- 3. WML Document Structure
- 4. WML Generic Metadata: <meta>
- 5. Comments in WML
- 6. Line Breaking in WML
- 7. Font Size and Style in WML
- 8. WML Preformatted Text: <pre>
- 9. WML Images
- 10. WML Tables
- 11. WML Anchor Links
- 12. Programming Softkeys of Mobile Phones and the <do> Element
- 13. WML Template and Menu
- 14. WML Events and the <onevent> Tag
- 15. Timer and the ontimer Event
- 16. WML Event: onenterbackward
- 17. WML Event: onenterforward
- 18. WML Selection Lists and the onpick Event
- 19. WML Input Fields
- 20. WML Variables
- 21. Submitting Form Data to the Server in WML
- 22. Clearing a Saved Form in WML