O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required