After completing the establishment of the WAP server and the installation of the WAP browser, we can use the WML language to write WAP web pages or applications and debug them through the WAP server and browser. Starting from this chapter, we will systematically learn WML language. This chapter mainly explains the basic knowledge of WML language, and the next chapter comprehensively explains the grammar, tags and rules of WML.
2.1 Simple examples of WML and editing and testing methods
The infinite markup language WML (Wireless Markup Language) is a language based on the extended markup language XML (Extension Markup Language), which is a subset of XML. It can display various text, images and other data. It was proposed by WAP Forum () and designed specifically for wireless device users to provide interactive interfaces. The current version is version 1.1. These wireless devices include mobile phones, pagers and personal digital assistant PDAs (Personal Digital Assistants).
2.1.1 WML and WAP devices
In order to better understand and use the WML language, developers should have a rough understanding of the characteristics and characteristics of the devices used by WML and devices that support WML.
Generally speaking, wireless devices used by WML usually have the following characteristics:
It is smaller than a normal personal computer;
The device has limited memory and its CPU performance is also limited;
The communication bandwidth is narrow and the delay is longer.
Taking mobile phones and PDAs as examples, devices that support WML mainly have the following characteristics:
There is a display screen that can display 2. The characters of each; 2. The characters of the evil address are supported; 2. The characters of the evil address are supported;
Support operators to use arrows or numeric buttons to make selections;
Printable codes that support ASCII;
There are usually two programmable function keys, namely the Accpet key and the Options key, which are usually arranged below the screen close to the keyboard;
There is usually a Prev navigation key.
The purpose of introducing the WAP device used in WML is to hope that readers can understand the characteristics of the WML language through the characteristics and characteristics of the WAP device, and then have a rough understanding of the problems that WML programming needs to solve.
2.1.2 WML program using text editor
When writing WAP web pages or applications in WML, you need to use an editor to edit them. Like HTML programming, programs written in WML are also plain file text and can be written using any text editor, such as "NotePad" in Windows system. You can also use software such as Nokia WAP Toolkie (the specific usage of this will be mentioned in the future learning process). Let’s introduce the first method first, and then the second one.
If you want to use Notepad to write a WML program, you can click the "Start" button in the Windows system, and then point the cursor to "Programs", "Accessories", and then start the "NotePad" program from the menu that appears. Its edit window will then appear on the screen, from which you can enter and write a WML program.
As an example, we can enter the following simple program.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//wapforun//DTD WML 1.1//EN" "/DTD/wml_1.">
<xml>
<card title="Title">
<P>
<!--Write your card implementation here.-->
Hello World!!
</P>
</card>
</xml>
Save it as a file after typing. Note that the file extension should be xml instead of txt when saving.
2.1 Simple examples of WML and editing and testing methods
The infinite markup language WML (Wireless Markup Language) is a language based on the extended markup language XML (Extension Markup Language), which is a subset of XML. It can display various text, images and other data. It was proposed by WAP Forum () and designed specifically for wireless device users to provide interactive interfaces. The current version is version 1.1. These wireless devices include mobile phones, pagers and personal digital assistant PDAs (Personal Digital Assistants).
2.1.1 WML and WAP devices
In order to better understand and use the WML language, developers should have a rough understanding of the characteristics and characteristics of the devices used by WML and devices that support WML.
Generally speaking, wireless devices used by WML usually have the following characteristics:
It is smaller than a normal personal computer;
The device has limited memory and its CPU performance is also limited;
The communication bandwidth is narrow and the delay is longer.
Taking mobile phones and PDAs as examples, devices that support WML mainly have the following characteristics:
There is a display screen that can display 2. The characters of each; 2. The characters of the evil address are supported; 2. The characters of the evil address are supported;
Support operators to use arrows or numeric buttons to make selections;
Printable codes that support ASCII;
There are usually two programmable function keys, namely the Accpet key and the Options key, which are usually arranged below the screen close to the keyboard;
There is usually a Prev navigation key.
The purpose of introducing the WAP device used in WML is to hope that readers can understand the characteristics of the WML language through the characteristics and characteristics of the WAP device, and then have a rough understanding of the problems that WML programming needs to solve.
2.1.2 WML program using text editor
When writing WAP web pages or applications in WML, you need to use an editor to edit them. Like HTML programming, programs written in WML are also plain file text and can be written using any text editor, such as "NotePad" in Windows system. You can also use software such as Nokia WAP Toolkie (the specific usage of this will be mentioned in the future learning process). Let’s introduce the first method first, and then the second one.
If you want to use Notepad to write a WML program, you can click the "Start" button in the Windows system, and then point the cursor to "Programs", "Accessories", and then start the "NotePad" program from the menu that appears. Its edit window will then appear on the screen, from which you can enter and write a WML program.
As an example, we can enter the following simple program.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//wapforun//DTD WML 1.1//EN" "/DTD/wml_1.">
<xml>
<card title="Title">
<P>
<!--Write your card implementation here.-->
Hello World!!
</P>
</card>
</xml>
Save it as a file after typing. Note that the file extension should be xml instead of txt when saving.
123456Next pageRead the full text