Writing your First Application.
Now it's time to mould your Internet Data for the entire Unwired World!
Our "Welcome to Unwired World" application will familiarize you with the WML code.
As mentioned earlier WAP applications are written in WML (Wireless Markup Language). Now first of all we will explain the WML. WML is a markup is strongly similar to HTML and is based on Extensible Markup Language(XML). Formal Document Type Definition (DTD) for WML is provided by WAP Forum and is available at:
Understanding Deck and Card
Let's create our first application. So, here is the code of our application.
To test the above code copy and paste below and then press test button.
In any WML application first three line is must and it contains the XML and document type declaration.
After XML and document type declaration WML deck start
with <wml> and ends with </wml> tags. Each
deck may contain one or more cards. First card of WML
page is displayed by the cellular device and this card
provides the links to the other cards of the deck.
WML card starts with <card>and ends with
</card> tag. Attribute "id" of card
element gives the identity to the card and using this id
we can refer any card in the WML page. Next is <p>
tag which we are using to display the paragraph. We can
use <p>, <b>, <i>, <br>,
<a> in our programming and these tags are
identical to the HTML tags.
By the end of this chapter you are very much familiar with the WML language. Now try the follwing WML script which uses the different formating tags. You can test your script by copying and pasting the code in above text area and pressing the test button.
Now write your own scripts and test it.
In the next section you will learn how to write more than one cards in a deck and define the navigational links between them.
Liked it! Share this Tutorial