XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.


Generating RSS with XSLT and Amazon ECS

August 30, 2006

One choice you have to make when working with web services is how you will process the web service response. You could build the processing into a rich client, but that would likely require some type of installation for others to use your application. You could process the web service response on a server, but that requires, well, a server. Amazon ECS has an alternate solution: the XSLT service.

XSLT is a language for transforming XML into other formats. The XSLT service with Amazon ECS can transform a REST response using an XSLT file you identify by adding a parameter that specifies the location of the file and returning the transformed result. This means that a call to the Amazon ECS web service can return HTML, text, or any other format you want and makes it a compelling alternative to building a rich-client or server-based solution.

In this article we'll walk through the steps for generating an RSS feed for Amazon Wish Lists using Amazon ECS and the XSLT service. We're assuming you have some experience with XSLT, but the Additional Resources section has some links for learning more about the technologies we're using. There's also a complete XSLT file that you can download for your own use.

Finding a Wish List ID

The manual way to find your Wish List ID is to grab it off of the retail web site. For example, the URL for Brian's Wish List is:


In this case, the Wish List ID is 30BOZ74K6RSKJ.

The more programmatic way to get a Wish List ID is to use the ListSearch operation and search for lists associated with a specific e-mail address or name. For example, this request searches for a Wish List:


Starting with an Amazon ECS Request

To create a RSS feed for Wish Lists, let's first start out with a basic request to the Amazon ECS REST interface that returns information about a Wish List. (The fact that it's one of the author's Wish Lists is completely random.)


This request returns information about each item on the Wish List. This is a snippet of the information we'll transform with our XSLT file:

      <CustomerName>Brian Swan</CustomerName>
            <Title>Product Name</Title>

Pages: 1, 2

Next Pagearrow