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

Hyperlinks

WML also supports an <a> element for hyperlinks. Like the HTML version of this element, you use the href attribute to specify the URI you want to navigate to. Here's an example that takes the user to the Apache WML example:

Listing . ch20_13.wml
 
<?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="Hyperlinks">
        <p align="center"><b>Hyperlinks</b></p>
        <p>
            Want to see some WML examples?
            Take a look at the
            <a href="http://www.apachesoftware.com/wml/wmldemo.wml">
					Apache examples
					</a>.
        </p>
    </card>
    </card>
</wml>

You can see the results of this WML in Figure 20-12. When the user clicks the hyperlink, Klondike will navigate to the target URI.

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