Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 
INDEX
>Introduction
>Understanding the Wireless Markup Language
>Valid WML Elements
>Building Applications With WML
>Creating A WML Deck
>Calling A Server Script
>Conclusion
 

Understanding the Wireless Markup Language

WML is based on XML, a markup language that has garnered enormous support due its ability to describe data (HTML, meanwhile, is used to describe the display of data...a big difference). While HTML predefines a "canned" set of tags guaranteed to be understood and displayed in a uniform fashion by a Web browser, XML allows the document creator to define any set of tags he or she wishes to. This set of tags is then grouped into a set of grammar "rules" known as the Document Type Definition, or DTD. As mentioned earlier, the DTD used to define WML is located at:

http://www.wapforum.org/DTD/wml_1.1.xml

If a phone or other communications device is said to be WAP-capable, this means that it has a piece of software loaded onto it (known as a microbrowser) that fully understands how to handle all entities in the WML 1.1 DTD.

The first statement within an XML document is known as a prolog. While the prolog is optional, it consists of two lines of code: the XML declaration (used to define the XML version) and the document type declaration (a pointer to a file that contains this document’s DTD). A sample prolog is as follows:

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

Following the prolog, every XML document contains a single element that contains all other subelements and entities. Like HTML all elements are bracketed by the

<>
and
</>
characters. As an example: <code><element>datadatadata</element></code>. There can only be one document element per document. With WML, the document element is <code><wml></code>; all other elements are contained within it.

The two most common ways to store data within an XML document are elements and attributes. Elements are structured items within the document that are denoted by opening and closing element tags. Elements can also contain sub-elements as well. Attributes, meanwhile, are generally used to describe an element. As an example, consider the following code snippet:


<!-- This is the Login Card -->
<card id="LoginCard" title="Login">
Please select your user name.
</card>

In the code above, the card element contains the id and title attributes. (On a side note, a comment in WML must appear between the tags.) We will make use of the WML-defined elements and their attributes later as we build our examples.

Next: Valid WML Elements

Sponsors

Search

Eliminate irrelevant hits with our industry-specific search engine!









Wireless Developer Network - A MindSites Group Trade Community
Copyright© 2000-2010 MindSites Group / Privacy Policy
Send Comments to:
feedback@wirelessdevnet.com