Filzhut.net Filzhut.net amazon_functions for PHP (Version 0.9)
Making the work with Amazon.com™ Web Services Version 1.0 much easier

What are the keys of the reply-array?

If your perform a search the data you receive is just the XML-result in an array structure. So the structure of the returned array is the same like the offical amazon™ Document-Type-Definition (DTD) in the LITE and the HEAVY version. Use the LITE version to perform fast searches and when you want to display many products, for example in a selection list. The HEAVY version contains very detailed information on a product - and so it takes a longer time to be loaded.

Example 1. These keys are included in the LITE version

Details
  Asin
  ProductName
  Authors
    Author
    Author
  Artists
    Artist
    Artist
  Manufacturer
  ReleaseDate
  OurPrice
  ListPrice
  UsedPrice
  ImageUrlLarge
  ImageUrlMedium
  ImageUrlSmall

Example 2. DTD of the LITE version

<?xml version="1.0" encoding="UTF-8"?>
<!-- ...................................................................... -->
<!-- File: developer-heavy.dtd -->
<!-- ...................................................................... -->
<!-- DTD for developer.amazon.com xml -->
<!ELEMENT ProductInfo (Details?,ShoppingCart?)>
<!ATTLIST Details
	url CDATA #REQUIRED
>
<!-- url is the url of the product page -->
<!ELEMENT Artist (#PCDATA)>
<!ELEMENT Artists (Artist+)>
<!ELEMENT Asin (#PCDATA)>
<!ELEMENT Author (#PCDATA)>
<!ELEMENT Authors (Author+)>
<!ELEMENT Manufacturer (#PCDATA)>
<!ELEMENT ImageUrlLarge (#PCDATA)>
<!ELEMENT ImageUrlMedium (#PCDATA)>
<!ELEMENT ImageUrlSmall (#PCDATA)>
<!ELEMENT ListPrice (#PCDATA)>
<!ELEMENT OurPrice (#PCDATA)>
<!ELEMENT ReleaseDate (#PCDATA)>
<!ELEMENT ProductName (#PCDATA)>
<!ELEMENT UsedPrice (#PCDATA)>
<!ELEMENT Details (Asin?, ProductName, Authors?, Artists?, Manufacturer?,
 ReleaseDate?, OurPrice?, ListPrice?, UsedPrice?, ImageUrlLarge, ImageUrlMedium,
 ImageUrlSmall )>
<!ELEMENT ShoppingCart (CartId?, Items?)>
<!ELEMENT CartId (#PCDATA)>
<!ELEMENT Items (Item+)>
<!ELEMENT Item (ItemId, ProductName?, Description?, Asin, Quantity?, ListPrice?, OurPrice?)>
<!ELEMENT ItemId (#PCDATA)>
<!ELEMENT Description (#PCDATA)>
<!ELEMENT Quantity (#PCDATA)>

Example 3. DTD of the HEAVY version

<?xml version="1.0" encoding="UTF-8"?>
<!-- ...................................................................... -->
<!-- File: developer-heavy.dtd -->
<!-- ...................................................................... -->
<!-- DTD for developer.amazon.com xml -->
<!ELEMENT ProductInfo (Details*, ShoppingCart?)>
<!ELEMENT Accessories (Accessory+)>
<!-- if the item is an accessory, this element provides the name of what it is accessory for -->
<!ELEMENT Accessory (#PCDATA)>
<!ELEMENT Actor (#PCDATA)>
<!ELEMENT AgeGroup (#PCDATA)>
<!ELEMENT Author (#PCDATA)>
<!ELEMENT Asin (#PCDATA)>
<!ELEMENT Authors (Author+)>
<!ELEMENT Availability (#PCDATA)>
<!ELEMENT AvgCustomerRating (#PCDATA)>
<!ELEMENT Binding (#PCDATA)>
<!ELEMENT BrowseList (BrowseNode+)>
<!ELEMENT BrowseNode (BrowseId, BrowseName)>
<!ELEMENT BrowseId (#PCDATA)>
<!ELEMENT BrowseName (#PCDATA)>
<!ELEMENT ByArtist (#PCDATA)>
<!-- TRACKS element lists all the separate pieces on the CD - e.g. song in an album -->
<!ELEMENT Catalog (#PCDATA)>
<!ELEMENT CollectiblePrice (#PCDATA)>
<!ELEMENT Comment (#PCDATA)>
<!ELEMENT CustomerReview (Rating, Summary, Comment)>
<!ELEMENT Details (Asin?, Catalog?, ProductName?, KeyPhrase+, Isbn?,
 Upc?, Mpn?, Manufacturer?, Distributor?, Binding?, Authors?, ReadingLevel?,
 Publisher?, Rank?, OurPrice?, ListPrice?, UsedPrice?, CollectiblePrice?,
 RefurbishedPrice?, AvgCustomerRating?, Features?, Tracks?, Accessories?,
 AgeGroup?, EsrbRating?, Platforms?, TheatricalRelease?, Starring?,
 Directors?, MpaaRating?, Encoding?, NumMedia?, ReleaseDate?, Availability?,
 BrowseList?, ImageUrlSmall?, ImageUrlMedium?, ImageUrlLarge?, Reviews?,
 SimilarProducts?, Lists?, ThirdPartyNew? )>
<!ATTLIST Details
	url CDATA #REQUIRED
>
<!-- url is the url of the product page -->
<!ELEMENT Director (#PCDATA)>
<!ELEMENT Directors (Director+)>
<!ELEMENT Distributor (#PCDATA)>
<!ELEMENT Encoding (#PCDATA)>
<!ELEMENT EsrbRating (#PCDATA)>
<!ELEMENT Feature (#PCDATA)>
<!-- any additional feature of the product may be descibed using FEATURE -->
<!ELEMENT Features (Feature+)>
<!ELEMENT ImageUrlLarge (#PCDATA)>
<!ELEMENT ImageUrlMedium (#PCDATA)>
<!ELEMENT ImageUrlSmall (#PCDATA)>
<!ELEMENT Isbn (#PCDATA)>
<!ELEMENT KeyPhrase (#PCDATA)>
<!ATTLIST KeyPhrase
	type (primary | secondary) #REQUIRED
>
<!-- there should be only one primary keyphrase. 
          Key-phrases are be 2-3 words long.  
          Longer or shorter key-phrases may be supplied, but they have less effect on retrieval. 
          Think of key-phrase as a query the listing should be returned for. 
          Normally, only one or two documents with the same key-phrase are returned for one query.  
          Therefore, it helps to supply different key-phrases for different documents. 
       -->
<!ELEMENT Lists (ListId+)>
<!ELEMENT ListId (#PCDATA)>
<!ELEMENT Manufacturer (#PCDATA)>
<!ELEMENT MpaaRating (#PCDATA)>
<!ELEMENT Mpn (#PCDATA)>
<!ELEMENT NumMedia (#PCDATA)>
<!ELEMENT OurPrice (#PCDATA)>
<!ELEMENT Platform (#PCDATA)>
<!-- PLATFORM is the hardware/software platform for the game - e.g. Nintendo/64, Window Me -->
<!ELEMENT Platforms (Platform+)>
<!ELEMENT ListPrice (#PCDATA)>
<!ELEMENT Product (#PCDATA)>
<!ELEMENT Publisher (#PCDATA)>
<!ELEMENT Rank (#PCDATA)>
<!--  This is the ranking of this product in this catalog - 
          e.g. how often people buy this product, or how much you want to promote it. 
       -->
<!ELEMENT Rating (#PCDATA)>
<!ELEMENT ReadingLevel (#PCDATA)>
<!ELEMENT RefurbishedPrice (#PCDATA)>
<!ELEMENT ReleaseDate (#PCDATA)>
<!ELEMENT Reviews (AvgCustomerRating, CustomerReview+)>
<!ELEMENT SimilarProducts (Product+)>
<!ELEMENT Starring (Actor+)>
<!ELEMENT Summary (#PCDATA)>
<!ELEMENT TheatricalRelease (#PCDATA)>
<!ELEMENT ThirdPartyNew (#PCDATA)>
<!ELEMENT ProductName (#PCDATA)>
<!ELEMENT Track (#PCDATA)>
<!ELEMENT Tracks (Track+, ByArtist+)>
<!ELEMENT Upc (#PCDATA)>
<!ELEMENT UsedPrice (#PCDATA)>
<!ELEMENT ShoppingCart (CartId?, Items?)>
<!ELEMENT CartId (#PCDATA)>
<!ELEMENT Items (Item+)>
<!ELEMENT Item (ItemId, ProductName?, Description?, Asin, Quantity?, ListPrice?, OurPrice?)>
<!ELEMENT ItemId (#PCDATA)>
<!ELEMENT Description (#PCDATA)>
<!ELEMENT Quantity (#PCDATA)>


© by Filzhut.net, Daniel Filzhut 2002