Skip to Main Content
Amazon Hacks
book

Amazon Hacks

by Paul Bausch
August 2003
Intermediate to advanced content levelIntermediate to advanced
304 pages
7h 33m
English
O'Reilly Media, Inc.
Content preview from Amazon Hacks

Create a Wireless Wish List

Take your Wish List wherever you go with AWS, XSLT, and WAP!

How many times have you been browsing at a bookstore or video store and you can’t remember which books or movies you wanted to pick up? Sure, you could write them all down on a piece of paper and take it with you, but what fun would that be? Instead, you can use powerful cell networks and web applications to do the work for you. If you track wanted books and movies with your Amazon Wish List and have a WAP-enabled cell phone, you can always have your list handy.

WAP stands for Wireless Access Protocol, and it’s used for delivering information to cell phones and other handheld devices. The information itself is formatted with WML (Wireless Markup Language), an XML format.

Just as HTML pages have <body> elements that contain the bulk of the page, WML pages have <card> elements. Each WML page can contain several cards, but only one card is displayed at a time. Also, links work much the same way as in HTML. Instead of <a href> tags, WML relies on <anchor> and <go href> tags. This example creates one card with a list of items. Each item links to the Amazon WAP product detail page for that item.

The Code

Making AWS responses available to a cell phone is just a matter of converting one XML format (AWS response) to another (WML). Once again, Amazon’s XSLT service makes this quick work.

Create an XSL file called wap_wishlist.xsl with the following code:

<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet ...
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

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

From ChatGPT to HackGPT: Meeting the Cybersecurity Threat of Generative AI

Karen Renaud, Merrill Warkentin, George Westerman
Incident Metrics in SRE

Incident Metrics in SRE

Stepan Davidovic

Publisher Resources

ISBN: 0596005423Supplemental ContentCatalog PageErrata