What is WML? _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
& Nbsp; WML (WirelessMarkupLanguage-Wireless Markup Language ). It is a markup language inherited from HTML, but WML is based on XML, so it is stricter than HTML. WML is used to create pages that can be displayed in the WAP browser. Pages written in WML are called DECKS. DECKS is constructed as a set of CARDS. This type of WML (Wireless Markup Language-Wireless Markup Language ). It is a markup language inherited from HTML, but WML is based on XML, so it is stricter than HTML.
WML is used to create pages that can be displayed in the WAP browser. Pages written in WML are called DECKS. DECKS is constructed as a set of CARDS.
This descriptive language is the same as the HTML language we often hear. It belongs to the XML language family. The syntax of WML is the same as that of XML. WML is a subset of XML.
The content written in HTML can be read in IE, Netscape, and other browsers on our PC, WML language files are specially used for display on wireless terminal display devices such as mobile phones. They can also provide users with human-computer interaction interfaces, accept the query and other information entered by the user, and then return the final information he wants to obtain to the user.
[Edit this section] what is WMLScript?
WML uses WMLScript to run simple code on the client. WMLScript is a lightweight JavaScript language. However, WML scripts are not embedded in the WML page. The WML page only contains references to the Script URL. Before running the WML script on the WAP browser, it must be compiled into Byte encoding on the server.
Create an online page creation environment
The WML file itself is a text file, so it is not a problem to edit it. You can use it in your editor.
Of course, because the current browsers cannot display WML pages, and we cannot always perform tests on our mobile phones (the speed is too slow), we need a simulator. Now mobile phone manufacturers such as NOKIA, ERICSSON, and MOTOROLA all produce corresponding products. You only need to download them. Of course, in addition to the simulator, you also need a graphical converter (used to make drawing files in WAP format), a character Transcoder (Chinese Character <=> UNICODE), and so on. The tools and forum pages on this site are described.
WML file structure
A WML page is usually called a desktop (DECK), which is composed of a group of cards that are connected to each other. When a mobile phone accesses a WML page, all the cards on the page will be downloaded from the WAP Server to the device. The switch between cards is handled by a computer built into the phone, and no information needs to be retrieved from the server. CARD can contain text, tags, links, input control, tasks, images, and so on. Cards can be linked to each other.
The object of the document is included in ... Mark, every CARD in the document is included in ... Mark, and the actual text section is included in...
Marking.
Simple Example:
  
  Http://www.wapforum.org/DTD/wml_1.1.xml>
  
  
Hello world!
  
  
The result is as follows:
------ HELLO ------
Hello World!
The specific explanations of the components in DECK are described in other sections of this tutorial.
WML Character Set
WML is a subset of XML and inherits the character set settings of XML. The default character set for WML documents is the UTF-8.
There are two ways to display Chinese characters. The simplest way is to use encoding in the Document Header, that is, change the first line:
  
However, it is frustrating that some mobile phones and simulators do not support this method (which will happen in the future). So currently, 2nd methods are more common: Do not change character set settings, however, UNICODE is used to represent Chinese characters when writing Chinese characters, for example:
   Address book
Representative:
Address book
WML elements: tags and attributes
The main content of WML is text. Because the mark will reduce the communication speed with the handheld device, only a small part of the WML standard is used. Tags used for tables and images are almost excluded.
Like XML, in WML, all elements are placed in symbols "<" and ">" and contain a start sign, an end sign, and a content sign, or use the control mark of the end. Like this:
   Content Example: Hello World!
Or
   For example:
And
WML also supports marking attributes in the flag. An attribute is the additional information of a flag. It is different from the content of an element and is not displayed on the screen. The attribute is usually specified after the start flag of the element. As in the last example above.
Because WML is an application of XML, all WML labels and attributes are case sensitive ( And And all tags must end correctly. WML requires that the attribute value be enclosed in double quotation marks or single quotation marks. Single quotation marks can be placed in attribute marks or double quotation marks. Character can also be used as the attribute value.
WML comments
XML supports the following annotation formats:
  
These annotations are not displayed in the browser.
WML does not support annotation of nested elements.
Link (URL)
WML external reference is the same as HTML
Http://www.itsalon.net/index.wml or
Http://www.itsalon.net/index.wml#login
Internal reference. If next is a CARD in the current DECK, you can use this method:
# Next
There are two WML elements that provide the link function: (See tasks) and (see events ).
CDATA
XML supports the concept of CDATA to display text that does not need to be interpreted. The following example uses the CDATA element to display the WML command text on the WML page.
   This is data
  ]>
The following content is displayed in the browser window:
   This is data
  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.