rendered paste bodyThis is the XML:
<Feed>
<FeedGenerationDate>Wed, 24 Jan 2007 01:16:20 GMT</FeedGenerationDate>
<FeedType>ProductCatalogue</FeedType>
−
<Shop ShopID="122">
<ShopName>7digital.com partner</ShopName>
−
<Products>
−
<Product ProductID="57301">
<ProductName>The Album Formerly Known As....</ProductName>
<ProductSortName>The Album Formerly Known As....</ProductSortName>
<ProductType>Album</ProductType>
−
<ProductFormats>
<ProductFormat>WMA</ProductFormat>
<ProductFormat>AAC</ProductFormat>
<ProductFormat>MP3</ProductFormat>
</ProductFormats>
−
<ProductPrice>
<Amount>7.77</Amount>
<Currency>GBP</Currency>
</ProductPrice>
<ProductTrackCount>12</ProductTrackCount>
<ProductRunningTime>01:11:37</ProductRunningTime>
<ProductReleaseDate>Sat, 01 Jan 2000 00:00:00 GMT</ProductReleaseDate>
−
<ProductSleeveArtURL>
http://www.7digital.com/shops/assets/sleeveart/8717127013234_100.JPEG
</ProductSleeveArtURL>
−
<ProductDetailURL>
http://www.7digital.com/stores/productDetail.aspx?shop=122&sid=957888
</ProductDetailURL>
−
<ProductBuyURL>
http://www.7digital.com/stores/basket.aspx?shop=122&sid=957888
</ProductBuyURL>
−
<Artist ArtistID="8900">
<ArtistName>Carl Craig</ArtistName>
</Artist>
−
<Label LabelID="2666">
<LabelName>Rushhour</LabelName>
</Label>
</Product>
and this is the PHO Im trying to use to read the Product:
$data=file_get_contents("http://feeds.7digital.com/feedserver/catalogue/products.ashx?filetype=sample&partner=87");
$xml = new SimpleXMLElement($data);
foreach ($xml->Product as $product) {
echo $product->ProductName, '<br />';
}