Concept | tutorials
Here is a brief introduction to the concept of WML files, and other details are detailed in later chapters.
Statement
Because the WML language inherits from XML, a valid WML document must contain an XML declaration and a file type declaration.
The following is one of the most commonly used declarations, because the WML syntax is very strict, in order to avoid errors, the creator can copy and paste directly into the production document.
<?xml version= "1.0"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "http://www.wapforum.com/DTD/wml_1.1.xml" >
Note: The <?xml version= "1.0"?> statement must appear in the first row of a deck, and must be written with the insertion of any character, even if it is a space, which can cause grammatical errors.
Main structure
This is one of the simplest WML files:
<?xml version= "1.0"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en"
"http://www.wapforum.com/DTD/wml_1.1.xml" >
<wml>
<card title= "Sample" >
<p>hello wap!</p>
</card>
</wml>