WML Syntax

All programming languages contain syntax rules. These rules must be followed to produce valid code. WML is no exception. However, you can rest easy; markup languages contain less syntax rules than other programming languages. The following are three important areas in regard to WML syntax:

  • WML document prologue

  • WML character sets

  • WML case sensitivity

WML Document Prologue

Every WML deck you write must contain a document prologue. Compilers on the device, WAP gateways, and remote servers all use document prologues to interpret your code. Developers must include the XML document prologue at the top of every WML deck:

 1 <?xml version="1.0> 2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" 3 "http://www.wapforum.org/DTD/wml_1.1.xml"> ...

Get WAP 2.0 Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.