The <do> Element

WML <do> elements appear as bracketed text in Klondike, as bold text that you can click in devices such as cell phones. Clicking these elements performs some action. For example, say that I wanted to let the user navigate to the (nonexistent) WML document page at www.starpowder.com/planets.wml. In that case, I'd start with the <do> element, setting the type attribute to "accept" and adding a label with the label attribute, like this:

<?xml version="1.0"?> 
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 2.0//EN"
    "http://www.wapforum.org/dtd/wml20.dtd" >
<wml>
    <card id="Card1" title="The do Element">
        <p align="center"><b>The do Element</b></p>
        <do type="accept" label="Go to a new page...">
					.
					.
					.
					</do>
    </card>
</wml>

You can navigate ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.