Preferences - Do not show ads

Prolog refers to the first two lines of our "Hello World" WML example:

<?xml version="1.0"?>

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 />.

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.

Page 3 of 50 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?

WML Tutorial Table of Contents WML Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page