Skip to Content
Real World XML
book

Real World XML

by Steven Holzner
January 2003
Beginner to intermediate content levelBeginner to intermediate
1200 pages
23h 42m
English
Peachpit Press
Content preview from Real World XML

Text Input

WML also supports an <input> element. If you set this element's type attribute to text, you can display a text field, much like HTML text fields (note that not all microbrowsers will support this element).

Here's an example. In this case, I'll let the user enter the URI of a local file to navigate to in a text field. When the user clicks a <do> element labeled Go, the browser will navigate to that URI. I begin by creating the text field:

<?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="Text Input">
        <p align="center"><b>Text Input</b></p>
        <p>
             Navigate to:
					<input type="text" name="uri"/>
    .
    .
    .

When the user clicks the <do> element, we'll ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside XML

Inside XML

Steven Holzner
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0735712867Purchase book