Home > Articles > Web Services > XML

XML Reference Guide

📄 Contents

  1. XML Reference Guide
  2. Overview
  3. What Is XML?
  4. Informit Articles and Sample Chapters
  5. Books and e-Books
  6. Official Documentation
  7. Table of Contents
  8. The Document Object Model
  9. Informit Articles and Sample Chapters
  10. Books and e-Books
  11. Official Documentation
  12. DOM and Java
  13. Informit Articles and Sample Chapters
  14. Books and e-Books
  15. Implementations
  16. DOM and JavaScript
  17. Using a Repeater
  18. Repeaters and XML
  19. Repeater Resources
  20. DOM and .NET
  21. Informit Articles and Sample Chapters
  22. Books and e-Books
  23. Documentation and Downloads
  24. DOM and C++
  25. DOM and C++ Resources
  26. DOM and Perl
  27. DOM and Perl Resources
  28. DOM and PHP
  29. DOM and PHP Resources
  30. DOM Level 3
  31. DOM Level 3 Core
  32. DOM Level 3 Load and Save
  33. DOM Level 3 XPath
  34. DOM Level 3 Validation
  35. Informit Articles and Sample Chapters
  36. Books and e-Books
  37. Documentation and Implementations
  38. The Simple API for XML (SAX)
  39. Informit Articles and Sample Chapters
  40. Books and e-Books
  41. Official Documentation
  42. SAX and Java
  43. Informit Articles and Sample Chapters
  44. Books and e-Books
  45. SAX and .NET
  46. Informit Articles and Sample Chapters
  47. SAX and Perl
  48. SAX and Perl Resources
  49. SAX and PHP
  50. SAX and PHP Resources
  51. Validation
  52. Informit Articles and Sample Chapters
  53. Books and e-Books
  54. Official Documentation
  55. Document Type Definitions (DTDs)
  56. Informit Articles and Sample Chapters
  57. Books and e-Books
  58. Official Documentation
  59. XML Schemas
  60. Informit Articles and Sample Chapters
  61. Books and e-Books
  62. Official Documentation
  63. RELAX NG
  64. Informit Articles and Sample Chapters
  65. Books and e-Books
  66. Official Documentation
  67. Schematron
  68. Official Documentation and Implementations
  69. Validation in Applications
  70. Informit Articles and Sample Chapters
  71. Books and e-Books
  72. XSL Transformations (XSLT)
  73. Informit Articles and Sample Chapters
  74. Books and e-Books
  75. Official Documentation
  76. XSLT in Java
  77. Java in XSLT Resources
  78. XSLT and RSS in .NET
  79. XSLT and RSS in .NET Resources
  80. XSL-FO
  81. Informit Articles and Sample Chapters
  82. Books and e-Books
  83. Official Documentation
  84. XPath
  85. Informit Articles and Sample Chapters
  86. Books and e-Books
  87. Official Documentation
  88. XML Base
  89. Informit Articles and Sample Chapters
  90. Official Documentation
  91. XHTML
  92. Informit Articles and Sample Chapters
  93. Books and e-Books
  94. Official Documentation
  95. XHTML 2.0
  96. Documentation
  97. Cascading Style Sheets
  98. Informit Articles and Sample Chapters
  99. Books and e-Books
  100. Official Documentation
  101. XUL
  102. XUL References
  103. XML Events
  104. XML Events Resources
  105. XML Data Binding
  106. Informit Articles and Sample Chapters
  107. Books and e-Books
  108. Specifications
  109. Implementations
  110. XML and Databases
  111. Informit Articles and Sample Chapters
  112. Books and e-Books
  113. Online Resources
  114. Official Documentation
  115. SQL Server and FOR XML
  116. Informit Articles and Sample Chapters
  117. Books and e-Books
  118. Documentation and Implementations
  119. Service Oriented Architecture
  120. Web Services
  121. Informit Articles and Sample Chapters
  122. Books and e-Books
  123. Official Documentation
  124. Creating a Perl Web Service Client
  125. SOAP::Lite
  126. Amazon Web Services
  127. Creating the Movable Type Plug-in
  128. Perl, Amazon, and Movable Type Resources
  129. Apache Axis2
  130. REST
  131. REST Resources
  132. SOAP
  133. Informit Articles and Sample Chapters
  134. Books and e-Books
  135. Official Documentation
  136. SOAP and Java
  137. Informit Articles and Sample Chapters
  138. Books and e-Books
  139. Official Documentation
  140. WSDL
  141. Informit Articles and Sample Chapters
  142. Books and e-Books
  143. Official Documentation
  144. UDDI
  145. UDDI Resources
  146. XML-RPC
  147. XML-RPC in PHP
  148. Informit Articles and Sample Chapters
  149. Books and e-Books
  150. Official Documentation
  151. Ajax
  152. Asynchronous Javascript
  153. Client-side XSLT
  154. SAJAX and PHP
  155. Ajax Resources
  156. JSON
  157. Ruby on Rails
  158. Creating Objects
  159. Ruby Basics: Arrays and Other Sundry Bits
  160. Ruby Basics: Iterators and Persistence
  161. Starting on the Rails
  162. Rails and Databases
  163. Rails: Ajax and Partials
  164. Rails Resources
  165. Web Services Security
  166. Web Services Security Resources
  167. SAML
  168. Informit Articles and Sample Chapters
  169. Books and e-Books
  170. Specification and Implementation
  171. XML Digital Signatures
  172. XML Digital Signatures Resources
  173. XML Key Management Services
  174. Resources for XML Key Management Services
  175. Internationalization
  176. Resources
  177. Grid Computing
  178. Grid Resources
  179. Web Services Resource Framework
  180. Web Services Resource Framework Resources
  181. WS-Addressing
  182. WS-Addressing Resources
  183. WS-Notifications
  184. New Languages: XML in Use
  185. Informit Articles and Sample Chapters
  186. Books and e-Books
  187. Official Documentation
  188. Google Web Toolkit
  189. GWT Basic Interactivity
  190. Google Sitemaps
  191. Google Sitemaps Resources
  192. Accessibility
  193. Web Accessibility
  194. XML Accessibility
  195. Accessibility Resources
  196. The Semantic Web
  197. Defining a New Ontology
  198. OWL: Web Ontology Language
  199. Semantic Web Resources
  200. Google Base
  201. Microformats
  202. StructuredBlogging
  203. Live Clipboard
  204. WML
  205. XHTML-MP
  206. WML Resources
  207. Google Web Services
  208. Google Web Services API
  209. Google Web Services Resources
  210. The Yahoo! Web Services Interface
  211. Yahoo! Web Services and PHP
  212. Yahoo! Web Services Resources
  213. eBay REST API
  214. WordML
  215. WordML Part 2: Lists
  216. WordML Part 3: Tables
  217. WordML Resources
  218. DocBook
  219. Articles
  220. Books and e-Books
  221. Official Documentation and Implementations
  222. XML Query
  223. Informit Articles and Sample Chapters
  224. Books and e-Books
  225. Official Documentation
  226. XForms
  227. Informit Articles and Sample Chapters
  228. Books and e-Books
  229. Official Documentation
  230. Resource Description Framework (RDF)
  231. Informit Articles and Sample Chapters
  232. Books and e-Books
  233. Official Documentation
  234. Topic Maps
  235. Informit Articles and Sample Chapters
  236. Books and e-Books
  237. Official Documentation, Implementations, and Other Resources
  238. Rich Site Summary (RSS)
  239. Informit Articles and Sample Chapters
  240. Books and e-Books
  241. Official Documentation
  242. Simple Sharing Extensions (SSE)
  243. Atom
  244. Podcasting
  245. Podcasting Resources
  246. Scalable Vector Graphics (SVG)
  247. Informit Articles and Sample Chapters
  248. Books and e-Books
  249. Official Documentation
  250. OPML
  251. OPML Resources
  252. Summary
  253. Projects
  254. JavaScript TimeTracker: JSON and PHP
  255. The Javascript Timetracker
  256. Refactoring to Javascript Objects
  257. Creating the Yahoo! Widget
  258. Web Mashup
  259. Google Maps
  260. Indeed Mashup
  261. Mashup Part 3: Putting It All Together
  262. Additional Resources
  263. Frequently Asked Questions About XML
  264. What's XML, and why should I use it?
  265. What's a well-formed document?
  266. What's the difference between XML and HTML?
  267. What's the difference between HTML and XHTML?
  268. Can I use XML in a browser?
  269. Should I use elements or attributes for my document?
  270. What's a namespace?
  271. Where can I get an XML parser?
  272. What's the difference between a well-formed document and a valid document?
  273. What's a validating parser?
  274. Should I use DOM or SAX for my application?
  275. How can I stop a SAX parser before it has parsed the entire document?
  276. 2005 Predictions
  277. 2006 Predictions
  278. Nick's Book Picks

Now that we know how to use Perl to create a SOAP client, let's talk about the data we ultimately want to retrieve. Amazon Web Services underwent some major changes when it became Amazon Electronic Commerce Services (ECS) 4.0. Multiple search types have been combined, and new capabilities, such as a slew of operations involving shopping carts, have been added, but the ultimate goal is the same: to provide a web services interface to all (or at least most) of the information you would normally find using the traditional Amazon interface.

In general, Amazon provides two types of requests: searches and lookups. Searches enable you to find items based on specific criteria. For example, you may do a search for books on Perl or customer reviews written by people named "Neilson". Amazon provides 4 searches:

CustomerContentSearch
ItemSearch
ListSearch
SellerListingSearch

Once you know what object you're looking for, you can get the appropriate information about it using a lookup. You pass the object's ID into the lookup operation, and the response contains the information about the object. Amazon provides 7 lookups:

BrowseNodeLookup
CustomerContentLookup
ItemLookup
SellerListingLookup
SellerLookup
SimilarityLookup
TransactionLookup

In previous incarnations of Amazon Web Services, you could choose how much data to return by choosing "Heavy" or "Lite" data. Now you can (and, in fact, must) be specific in the information you want returned by specifying the ResponseGroup. Available ResponseGroups include ItemIds, SalesRank and EditorialReview, as well as general groups such as Small, Medium and Large.

In our case, the goal is to pull information from a specific WishList, so the first thing we need to do is get the ListId. To do that, we could go ahead and do a ListSearch, but in the interest of space, we'll find it the easy way.

Go to Amazon.com and look up the WishList you want to display. The ListId is part of the URL. For example, my wish list is at

http://www.amazon.com/gp/registry/registry.html/102-9881941-7928904?%5Fencoding=UTF8&id=4M6WEGGRFLZO
and you can see the 12-digit ID in bold.

Once we have the ListId, we're ready to look up the list itself. As part of the request, we'll need to pass the following parameters:

  • Service: In this case, always AWSECommerceService. (Amazon provides other services, such as a reporting service for developers, but this is the main service.)
  • SubscriptionID: This is your "developer taken" that authorizes you to make requests. If you don't already have one, you can get one at https://aws-portal.amazon.com/gp/aws/developer/registration/index.html/102-9881941-7928904.
  • Operation: What it is you want to do. In this case, the operation is ListLookup.
  • ListType: In our case, WishList. Other possible values are Listmania and WeddingRegistry.
  • ListId: This is the ID we pulled out of the URL for our target WishList.
  • ResponseGroup: The data we want returned. In this case, we're going to choose the Medium group, because it includes the URL for the item detail page and a link to the thumbnail image so we can display it on the page. (See the resources for more information on available ResponseGroup values.)
  • AssociateTag: This is your id for the Amazon Associates program, which enables you to earn commisions on items your visitors buy. You can sign up for your own ID at http://associates.amazon.com. (Or if you don't want to, you're welcome to use mine, thevanguardsc-20. :-) )

Now, before we go ahead and build the SOAP request, we can check to make sure our parameters are going to give us what we want. Amazon ECS provides both a SOAP version and a REST version of their services. SOAP is what we've been using so far in this section and what we ultimately will use to get our results, but REST is a simple alternative we can use to check the query results before we get heavily into coding.

REST requests are simple GET requests, with all of the parameters encoded in the URL, as follows:

http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&SubscriptionId=0NQJY4BXVZP3SFWWPZG2&Operation=ListLookup&ListType=WishList&ListId=4M6WEGGRFLZO&ResponseGroup=Medium&AssociateTag=thevanguardsc-20

If we call this URL from the browser, we can see the results:

<?xml version="1.0" encoding="UTF-8"?>
<ListLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2005-07-26">

  <OperationRequest>
    <HTTPHeaders>
      <Header Name="UserAgent" Value="Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4"></Header>
    </HTTPHeaders>
    <RequestId>1S8ARRY1FF9NFE0PW3XY</RequestId>

    <Arguments>
      <Argument Name="Service" Value="AWSECommerceService"></Argument>
      <Argument Name="AssociateTag" Value="thevanguardsc-20"></Argument>
      <Argument Name="ListId" Value="4M6WEGGRFLZO"></Argument>
      <Argument Name="SubscriptionId" Value="0NQJY4BXVZP3SFWWPZG2"></Argument>

      <Argument Name="ResponseGroup" Value="Medium"></Argument>
      <Argument Name="ListType" Value="WishList"></Argument>
      <Argument Name="Operation" Value="ListLookup"></Argument>
    </Arguments>
    <RequestProcessingTime>0.486002922058105</RequestProcessingTime>

  </OperationRequest>
  <Lists>
    <Request>
      <IsValid>True</IsValid>
      <ListLookupRequest>

        <ListId>4M6WEGGRFLZO</ListId>
        <ListType>WishList</ListType>
        <ResponseGroup>Medium</ResponseGroup>
      </ListLookupRequest>

    </Request>
    <List>
      <ListItem>
        <Item>
          <ASIN>B000002ORP</ASIN>

          <DetailPageURL>http://www.amazon.com/exec/obidos/redirect?tag=thevanguardsc-20%26link_code=xm2%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=B000002ORP%2526tag=thevanguardsc-20%2526lcode=xm2%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/B000002ORP%25253FSubscriptionId=0NQJY4BXVZP3SFWWPZG2%252526coliid=I2KFNPNVJ3FGZ2%252526colid=4M6WEGGRFLZO</DetailPageURL>
          <SalesRank>2742</SalesRank>
          <SmallImage>
            <URL>http://images.amazon.com/images/P/B000002ORP.01._SCTHUMBZZZ_.jpg</URL>

            <Height Units="pixels">74</Height>
            <Width Units="pixels">75</Width>
          </SmallImage>
          <MediumImage>
            <URL>http://images.amazon.com/images/P/B000002ORP.01._SCMZZZZZZZ_.jpg</URL>

            <Height Units="pixels">158</Height>
            <Width Units="pixels">160</Width>
          </MediumImage>
          <LargeImage>
            <URL>http://images.amazon.com/images/P/B000002ORP.01._SCLZZZZZZZ_.jpg</URL>

            <Height Units="pixels">300</Height>
            <Width Units="pixels">303</Width>
          </LargeImage>
          <ImageSets>
            <ImageSet Category="primary">

              <SmallImage>
                <URL>http://images.amazon.com/images/P/B000002ORP.01._SCTHUMBZZZ_.jpg</URL>
                <Height Units="pixels">74</Height>
                <Width Units="pixels">75</Width>

              </SmallImage>
              <MediumImage>
                 <URL>http://images.amazon.com/images/P/B000002ORP.01._SCMZZZZZZZ_.jpg</URL>
                 <Height Units="pixels">158</Height>
                 <Width Units="pixels">160</Width>

              </MediumImage>
              <LargeImage>
                 <URL>http://images.amazon.com/images/P/B000002ORP.01._SCLZZZZZZZ_.jpg</URL>
                 <Height Units="pixels">300</Height>
                 <Width Units="pixels">303</Width>

              </LargeImage>
            </ImageSet>
          </ImageSets>
          <ItemAttributes>
            <Artist>Andrew Lloyd Webber</Artist>

            <Artist>Tim Rice</Artist>
            <Artist>Patti LuPone</Artist>
            <Artist>Mandy Patinkin</Artist>
            <Binding>Audio CD</Binding>

            <EAN>0076731010724</EAN>
            <Format>Cast Recording</Format>
            <Label>Decca U.S.</Label>
            <ListPrice>

              <Amount>3598</Amount>
              <CurrencyCode>USD</CurrencyCode>
              <FormattedPrice>$35.98</FormattedPrice>
            </ListPrice>

            <NumberOfDiscs>2</NumberOfDiscs>
            <ProductGroup>Music</ProductGroup>
            <ReleaseDate>1990-10-25</ReleaseDate>
            <Title>Evita (1978 Original Broadway Cast)</Title>

            <UPC>076731010724</UPC>
          </ItemAttributes>
          <OfferSummary>
            <LowestNewPrice>
              <Amount>2529</Amount>

              <CurrencyCode>USD</CurrencyCode>
              <FormattedPrice>$25.29</FormattedPrice>
            </LowestNewPrice>
            <LowestUsedPrice>
              <Amount>899</Amount>

              <CurrencyCode>USD</CurrencyCode>
              <FormattedPrice>$8.99</FormattedPrice>
            </LowestUsedPrice>
            <LowestCollectiblePrice>
              <Amount>9999</Amount>

              <CurrencyCode>USD</CurrencyCode>
              <FormattedPrice>$99.99</FormattedPrice>
            </LowestCollectiblePrice>
            <TotalNew>25</TotalNew>

            <TotalUsed>18</TotalUsed>
            <TotalCollectible>1</TotalCollectible>
            <TotalRefurbished>0</TotalRefurbished>
          </OfferSummary>

          <EditorialReviews>
            <EditorialReview>
              <Source>Amazon.com essential recording</Source>
              <Content>&lt;I&gt;Evita&lt;/I&gt; was Andrew Lloyd Webber's last show with Tim Rice before he went on to projects with less interesting collaborators, so it's no surprise that it remains his most consistently involving and rewarding work. Loosely based on the life of Eva Peron, the charismatic wife of post-World War II Argentine president Juan Peron, Rice's compelling story of one woman's rise from poverty to power is complemented by Lloyd Webber's colorful music as propelled by vigorous Latin rhythms. The showstopper, of course, is "Don't Cry for Me, Argentina," but the score is full of gems, including "On This Night of a Thousand Stars," "Oh, What a Circus," and "Another Suitcase in Another Hall." Headlining the 1978 Broadway cast, Patti LuPone is fabulous in the title role, showcasing her big voice and brash egotism in the role she was born to play. Mandy Patinkin is Che, the Greek-chorus character commenting on and criticizing the Perons, and his tenor is sweet on the ballads and powerful on the driving numbers. LuPone and Patinkin made their names with &lt;I&gt;Evita&lt;/I&gt; (and took home well-deserved Tonys), but it's the third principal, Bob Gunton, who elevates this cast to the stratosphere. As Peron--a role often filled by a nonsinger--Gunton inflects his strong voice with both menace and sensitivity. Forget the movie; this is the definitive version of this score, and an essential cast recording. &lt;I&gt;--David Horiuchi&lt;/I&gt;</Content>

            </EditorialReview>
          </EditorialReviews>
        </Item>
      </ListItem>
      <ListItem>
        ...
      </ListItem>

    </List>
  </Lists>
</ListLookupResponse>

So now that we know our parameters are right, we can start building the request.

According to the WSDL file, available online at http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl -- or see http://www.amazon.com/gp/aws/sdk/main.html/102-9881941-7928904?s=AWSEcommerceService&v=2005-07-26&p=ApiReference/ServiceVersioningArticle for WSDL files for non-US Amazon sites -- our request should look like this:

<?xml version='1.0' ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/12/soap-envelope"> 
 <env:Header></env:Header>
<env:Body>
    <ListLookup xmlns="http://webservices.amazon.com/AWSECommerceService/2005-07-26">   
        <SubscriptionId>0NQJY4BXVZP3SFWWPZG2</SubscriptionId>

        <AssociateTag>thevanguardsc-20</AssociateTag>
        <Request>
            <ListId>4M6WEGGRFLZO</ListId>
            <ListType>Wishlist</ListType>

            <ResponseGroup>Medium</ResponseGroup>
        </Request>
    </ListLookup>
</env:Body>
</env:Envelope>

That means we need to build our client as follows:

#!/usr/local/bin/perl
use lib qw(/home/nicholaschase/www/cgi-bin/lib/5.6.1/i386-linux
/home/nicholaschase/www/cgi-bin/lib/site_perl/5.6.1);

use SOAP::Lite;

my $lookup = SOAP::Lite->uri('http://webservices.amazon.com/AWSECommerceService/2005-07-26')
                       ->proxy('http://soap.amazon.com/onca/soap?Service=AWSECommerceService');

my $SubscriptionIdElement = SOAP::Data->name('SubscriptionId')
                                      ->value('0NQJY4BXVZP3SFWWPZG2');
my $AssociateTagElement = SOAP::Data->name('AssociateTag')
                                    ->value('thevanguardsc-20');

my $ListIdElement = SOAP::Data->name('ListId')
                              ->value('4M6WEGGRFLZO');
my $ListTypeElement = SOAP::Data->name('ListType')
                                ->value('WishList');
my $ResponseGroupElement = SOAP::Data->name('ResponseGroup')
                                     ->value('Medium');

my $RequestElementType = SOAP::Data->value($ListIdElement, 
                                           $ListTypeElement, 
                                           $ResponseGroupElement);

my $RequestElement = SOAP::Data->name('Request')
                               ->value($RequestElementType);

my $ListLookupRequest = SOAP::Data->value($SubscriptionIdElement, 
                                          $RequestElement);

my $response =  $lookup->ListLookup($ListLookupRequest);

Just as we did before with our sample client, we first create the proxy, and then the the payload, or the actual data of the request. We can then feed that data to the ListLookup method to get a response.

Now, before we move on to analyize the response, I want to make it clear that you can use this algorithm to request any data from Amazon ECS. The only difference between this and a search for books on polar bears or a list of items in the user's cart is the parameters you feed to the request.

OK, so we've made the request, and (theoretically, at least) we've gotten back an XML document that includes a list of items in the specified WishList. We can extract the title, URL, and image information as follows:

...
my $ListLookupRequest = SOAP::Data->value($SubscriptionIdElement, $RequestElement);

my $response =  $lookup->ListLookup($ListLookupRequest);

print "RequestProcessingTime = ";
print $response->dataof('//RequestProcessingTime')->value;
print "\n";

    for my $item ($response->valueof('//Item')) {
      print "Title is ". $item->{ItemAttributes}->{Title} . "\n";
      print "Details at ". $item->{DetailPageURL} . "\n";
      print "Thumbnail at ". $item->{SmallImage}->{URL} . "\n";
      print "\n";
   }

First, to make things simple, we're using a simple XPath-like expression to get a reference to a particular element in the response, the RequestProcessingTime. (See the REST result for the entire document, minus the SOAP envelope.) We're feeding it to the dataof() method, which returns a SOAP::Data object. We can then request the value. We also have the option of using the valueof() method.

But it's next that things get interesting. There's only one RequestProcessingTime element, but there are multiple Item elements, and we want child elements of each one. First we create a for loop, assigning each of them to the $item variable. For each one, we can then choose a child object. For the DetailPageURL, we only have to go down one level, but for the Title and the image URL we have to get the child of the child object.

If we run the client from the command line, we should see a response something like this:

RequestProcessingTime = 0.53298807144165
Title is Evita (1978 Original Broadway Cast)
Details at http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=sp1%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=B000002ORP%2526tag=ws%2526lcode=sp1%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/B000002ORP%25253FSubscriptionId=0NQJY4BXVZP3SFWWPZG2%252526coliid=I2KFNPNVJ3FGZ2%252526colid=4M6WEGGRFLZO
Thumbnail at http://images.amazon.com/images/P/B000002ORP.01._SCTHUMBZZZ_.jpg

Title is Evita: The Complete Motion Picture Music Soundtrack
Details at http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=sp1%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=B000002NAK%2526tag=ws%2526lcode=sp1%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/B000002NAK%25253FSubscriptionId=0NQJY4BXVZP3SFWWPZG2%252526coliid=I257XFPXXVVTNY%252526colid=4M6WEGGRFLZO
Thumbnail at http://images.amazon.com/images/P/B000002NAK.01._SCTHUMBZZZ_.jpg

Title is Live From the Middle East
Details at http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=sp1%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=B00000AFDX%2526tag=ws%2526lcode=sp1%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/B00000AFDX%25253FSubscriptionId=0NQJY4BXVZP3SFWWPZG2%252526coliid=I1YDL10XU8078Y%252526colid=4M6WEGGRFLZO
Thumbnail at http://images.amazon.com/images/P/B00000AFDX.01._SCTHUMBZZZ_.jpg

Title is The Big Bing : Black Holes of Time Management, Gaseous Executive Bodies, Exploding Careers, and Other Theories on the Origins of the Business Universe
Details at http://www.amazon.com/exec/obidos/redirect?tag=ws%26link_code=sp1%26camp=2025%26creative=165953%26path=http://www.amazon.com/gp/redirect.html%253fASIN=0060529555%2526tag=ws%2526lcode=sp1%2526cID=2025%2526ccmID=165953%2526location=/o/ASIN/0060529555%25253FSubscriptionId=0NQJY4BXVZP3SFWWPZG2%252526coliid=IYQW0YERYWS0B%252526colid=4M6WEGGRFLZO
Thumbnail at http://images.amazon.com/images/P/0060529555.01._SCTHUMBZZZ_.jpg
...

Note that Amazon, like most services of this type, limits requests to 10 items. If we wanted, we could use the ProductPage parameter to request the next set of 10. We can specify a value from 1 to 30, giving us access to the first 300 items on the list. And in fact we'll do exactly that, when we modify the code to choose a single random item from the list, next.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.