The ASP technology in WAP
Section III: WML
Although I have explained the phone to the server communication, but the real client is not a mobile phone. A software (WAP gateway) actually Yundang the role. It converts the request of the mobile phone to the HTTP request, but also returns the server's response to the mobile phone, and the WML file is compiled into a binary file by the WAP gateway at this time. While some WAP Geteway can convert HTML directly to WML, don't expect them to arbitrarily convert HTML to something we can read on the phone.
Of course, the emulator does not need a WAP gateway to work, it downloads the WML file directly from the server (or open WML directly on the local machine) and displays it on the phone's screen.
WAP Emulator
In order to use WAP services, like our poor can not afford to buy a mobile phone, we need a WAP emulator. You can go to Nokia website to download a Nokia Toolkit 1.2, and you also have to install Java Virtual Machine 1.2.2, which can be downloaded from Sun Company for free, this is an example.
WML structure
A WML document is made up of plates, and a plate contains a lot of cards. In practice, you can think of a plate as an HTML made up of many names.
The mobile phone downloads a complete plate, but only one card can be displayed at a time. Browse through links to different places.
We're going to see a simple WML document, and you need to know some of the most basic XML.
< XML version= "1.0"? >
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "http://www.wapforum.org/DTD/wml_1.1.xml" >
< WML >
<!--root element-->
< card id= "Card1" title= "Example 1" >
< p > <!--cards can only support p and do blocks->
< do type= "accept" label= "go to Card 2" >
< go href= "#card2"/>
</do >
This is the.
</p >
</card >
< card id= "Card2" title= "Example 1" >
< p >
This is the second card.
</p >
</card >
</WML >
Once the phone receives the block, it displays the first card, and when you press the soft button on the left, you see the second card.