<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Icecat &#8211; Roy Duineveld</title>
	<atom:link href="https://royduineveld.nl/tag/icecat/feed/" rel="self" type="application/rss+xml" />
	<link>https://royduineveld.nl</link>
	<description>Waarom moeilijk doen als het makkelijk kan?</description>
	<lastBuildDate>Tue, 27 Jan 2026 07:48:00 +0000</lastBuildDate>
	<language>nl</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.26</generator>
	<item>
		<title>Icecat XML verwerken deel 2, de array weergeven</title>
		<link>https://royduineveld.nl/icecat-xml-verwerken-deel-2-de-array-weergeven/</link>
		<comments>https://royduineveld.nl/icecat-xml-verwerken-deel-2-de-array-weergeven/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 16:53:43 +0000</pubDate>
		<dc:creator><![CDATA[Roy Duineveld]]></dc:creator>
				<category><![CDATA[Tips & Trucs]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Icecat]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">https://royduineveld.nl/?p=298</guid>
		<description><![CDATA[<p>Hierbij het vervolg op mijn eerste bericht hoe een Icecat XML verwerkt kan worden. Het uitlezen is het &#8220;moeilijkste&#8221; stuk, het weergeven is gewoon een mooie layout maken en daar...</p>
<p>Het bericht <a rel="nofollow" href="https://royduineveld.nl/icecat-xml-verwerken-deel-2-de-array-weergeven/">Icecat XML verwerken deel 2, de array weergeven</a> verscheen eerst op <a rel="nofollow" href="https://royduineveld.nl">Roy Duineveld</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Hierbij het vervolg op mijn eerste bericht hoe een <a title="Icecat XML verwerken" href="/icecat-xml-verwerken/" target="_blank">Icecat XML</a> verwerkt kan worden. Het uitlezen is het &#8220;moeilijkste&#8221; stuk, het weergeven is gewoon een mooie layout maken en daar de uitgelezen waardes in zetten.</p>
<h2>Foutafhandeling</h2>
<p>Om te beginnen, eerst maar even kijken of er geen fouten zijn.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// No icecat ID present?
if(!isset($data['id']))
{
	// Check for each error number and show the error
	if(isset($data[1]))
	{
		echo 'Error 1: '.$data[1];

	} elseif(isset($data[2]))
	{
		echo 'Error 2: '.$data[2];

	} elseif(isset($data[3]))
	{
		echo 'Error 3: '.$data[3];
	}
}
?&gt;
</pre>
<h2>Product informatie</h2>
<p>Zoals je hier al ziet wordt er elke keer gerefereerd naar $data, om dit niet steeds te hoeven doen is het meest makkelijke <a href="http://php.net/extract" target="_blank">extract</a> te gebruiken voor het weergeven van de product informatie. Wanneer er geen fouten zijn kunnen we verder:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;? extract($data); ?&gt;
&lt;h1&gt;&lt;?=$title;?&gt;&lt;/h1&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;th&gt;SKU&lt;/th&gt;
		&lt;td&gt;&lt;?=$sku;?&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;EAN&lt;/th&gt;
		&lt;td&gt;
			&lt;? foreach($ean as $e): ?&gt;
				&lt;?=$e;?&gt;&lt;br /&gt;
			&lt;? endforeach; ?&gt;
		&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;URL&lt;/th&gt;
		&lt;td&gt;&lt;a href=&quot;&lt;?=$url;?&gt;&quot; target=&quot;_blank&quot;&gt;&lt;?=$url;?&gt;&lt;/a&gt;&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>Zo kan ik nog wel even doorgaan, dit spreekt voor zich natuurlijk. Hierna komen we de product afbeeldingen tegen, dit is uiteraard door een simpele <a href="http://php.net/foreach" target="_blank">foreach</a> te gebruiken, weer te geven. Nog wel een opmerking hierbij. Op het moment van schrijven geeft Icecat niet altijd alle formaten afbeeldingen mee aan producten. De thumbnail en de grote afbeeldingen worden altijd meegegeven, de kleine en middelmatige missen soms wel eens.</p>
<h2>Product specificaties</h2>
<p>Het gebruik van een &#8220;foreach&#8221; geldt ook voor de product specificaties maar laat ik daar wel een voorbeeldje voor maken gezien dit meestal het belangrijkste is:</p>
<pre class="brush: php; title: ; notranslate">
&lt;h2&gt;Product Specifications&lt;/h2&gt;
&lt;table&gt;
&lt;? foreach($spec as $id=&gt;$s): ?&gt;
	&lt;tr&gt;
		&lt;th title=&quot;Icecat specification category ID: &lt;?=$id;?&gt;&quot;&gt;&lt;?=$s['name'];?&gt;&lt;/th&gt;
		&lt;td&gt;&lt;/td&gt;
	&lt;/tr&gt;
	&lt;? foreach($s['features'] as $id=&gt;$f): ?&gt;
		&lt;tr&gt;
			&lt;td title=&quot;Icecat specification feature ID: &lt;?=$id;?&gt;&quot;&gt;&lt;?=$f['name'];?&gt;&lt;/td&gt;
			&lt;td&gt;&lt;?=$f['pres_value'];?&gt;&lt;/td&gt;
		&lt;/tr&gt;
	&lt;? endforeach; ?&gt;
&lt;? endforeach; ?&gt;
&lt;/table&gt;
</pre>
<p>Alles kan natuurlijk uitgebreid en veel mooier gemaakt worden. Zo ook mijn kleine demo voor bij dit artikel:</p>
<p><a class="demo-button" href="https://royduineveld.nl/demos/icecat-xml/" target="_blank">Klik hier voor een online demo</a></p>
<blockquote><p>Als laatste nog even wat &#8220;sluikreclame&#8221; om een idee te geven wat er mogelijk is met de gegevens van Icecat. Bijvoorbeeld een <a title="WDB Trading" href="http://wdbtrading.nl" target="_blank">computer en toebehoren webshop</a> of website waar je <del><a title="Telbat - Tablets vergelijken" href="http://justtablets.nl" target="_blank">tablets kan vergelijken</a></del> (inmiddels offline maar de code staat op <a href="https://github.com/royduin/just-tablets" target="_blank">Github</a>).</p></blockquote>
<p>Het bericht <a rel="nofollow" href="https://royduineveld.nl/icecat-xml-verwerken-deel-2-de-array-weergeven/">Icecat XML verwerken deel 2, de array weergeven</a> verscheen eerst op <a rel="nofollow" href="https://royduineveld.nl">Roy Duineveld</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://royduineveld.nl/icecat-xml-verwerken-deel-2-de-array-weergeven/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Icecat XML verwerken</title>
		<link>https://royduineveld.nl/icecat-xml-verwerken/</link>
		<comments>https://royduineveld.nl/icecat-xml-verwerken/#comments</comments>
		<pubDate>Sat, 19 Jan 2013 16:58:48 +0000</pubDate>
		<dc:creator><![CDATA[Roy Duineveld]]></dc:creator>
				<category><![CDATA[Tips & Trucs]]></category>
		<category><![CDATA[Icecat]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">https://royduineveld.nl/?p=275</guid>
		<description><![CDATA[<p>Icecat is een fantastisch systeem om gratis product informatie te verkrijgen (en betaald nog veel meer). Helaas zijn er maar weinig goede/betaalbare kant en klare oplossingen te vinden om de...</p>
<p>Het bericht <a rel="nofollow" href="https://royduineveld.nl/icecat-xml-verwerken/">Icecat XML verwerken</a> verscheen eerst op <a rel="nofollow" href="https://royduineveld.nl">Roy Duineveld</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><a href="http://nl.wikipedia.org/wiki/Open_ICEcat" target="_blank">Icecat</a> is een fantastisch systeem om gratis product informatie te verkrijgen (en betaald nog veel meer). Helaas zijn er maar weinig goede/betaalbare kant en klare oplossingen te vinden om de gegevens te integreren. De URL integratie is dan wel super makkelijk zelf te doen maar als het om XML gaat wordt het vaak een ander verhaal. Inmiddels heb ik meerdere Icecat integraties gedaan, dit was allemaal op maat en niet voor standaard <a href="http://en.wikipedia.org/wiki/List_of_free_and_open_source_eCommerce_software" target="_blank">e-commerce systemen</a> als Magento, Prestashop, etc. Bij deze een stukje code om een XML &#8220;datasheet&#8221; uit te lezen. De gewenste waardes opgeven en je krijgt een array terug met alle informatie. Dit kan uitgebreid worden om de gegevens op te slaan in een database natuurlijk. Vervolgens kunnen met die gegevens eventuele product vergelijkingen of filters gemaakt worden.</p>
<h2>Icecat XML functie</h2>
<pre class="brush: php; title: ; notranslate">
&lt;?php
/**
 * =================================================================
 * Copyright (c) 2013 Roy Duineveld (royduineveld.nl)
 * =================================================================
 *
 * License
 * =================================================================
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the &quot;Software&quot;), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * =================================================================
 *
 * Notes
 * =================================================================
 * PHP 5.3 or higher is required!
 * =================================================================
 *
 * Changelog
 * =================================================================
 * Version 1.0 (19-01-2013)
 * - First release
 * Version 1.1 (22-01-2013)
 * - Two typos fixt
 * - Added ignore_errors in a stream_context_create function so
 *   file_get_contents will get the content even if it's returning
 *   a 404. So error 2 will not be triggered before error 3 get his
 *   chance. Error 3 correspond to the error Icecat is giving.
 * Version 1.2 (26-07-2013)
 * - Added urlencode to the SKU in the url so special chars will be
 *   encoded
 * =================================================================
 */

/**
 * Read Icecat data from XML into a array
 * @param  array $data Information array
 * Information array options:
 * ==========================
 * - ean 		= Product EAN
 * - sku 		= Product SKU
 * - brand  	= Product brand
 * - id_full 	= Icecat ID (if you've full Icecat)
 * - id_free 	= Icecat ID (if you're using Open-Icecat)
 * - language 	= Language
 * - username 	= Icecat username
 * - password  	= Icecat password
 * ==========================
 * @return array       Product information
 */
function icecat_to_array($data = array())
{
	// Extract data array
	extract($data);

	// Check given array
	if(!isset($ean) AND !isset($sku) AND !isset($id_full) AND !isset($id_free)){ $errors[1] = 'No EAN, SKU or Icecat ID given!'; goto the_end; }
	if(isset($sku) AND !isset($brand)){ $errors[1] = 'SKU given but no brand!'; goto the_end; }
	if(!isset($language)){ $errors[1] = 'No language given!'; goto the_end; }
	if(!isset($username) OR !isset($password)){ $errors[1] = 'No username and/or password given!'; goto the_end; }

	// Set url
	if(isset($ean)){ $url = 'http://' . $username . ':' . $password . '@data.Icecat.biz/xml_s3/xml_server3.cgi?ean_upc=' . $ean . ';lang=' . $language . ';output=productxml'; }
	if(isset($sku)){ $url = 'http://' . $username . ':' . $password . '@data.Icecat.biz/xml_s3/xml_server3.cgi?prod_id=' . urlencode($sku) . ';vendor=' . $brand . ';lang=' . $language . ';output=productxml'; }
	if(isset($id_free)){ $url = 'http://' . $username . ':' . $password . '@data.icecat.biz/export/freexml.int/' . $language . '/'.$id_free.'.xml'; }
	if(isset($id_full)){ $url = 'http://' . $username . ':' . $password . '@data.icecat.biz/export/level4/' . $language . '/'.$id_full.'.xml'; }

	// Get data
	$xml = @file_get_contents($url,false,stream_context_create(array('http' =&gt; array('ignore_errors' =&gt; true))));
	if(!$xml){ $errors[2] = 'Unable to download the product feed! Maybe Icecat isn\'t reachable!'; goto the_end; }

	// Load into Simple XML Element
	$xml = new SimpleXMLElement($xml);

	// Set xpaths
	$product 			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product&quot;);
	$product_attr 		= $product[0]-&gt;attributes();

		// Does Icecat give errors?
		if($product_attr['ErrorMessage']){ $errors[3] = (string)$product_attr['ErrorMessage']; goto the_end; }

	$category 			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/Category&quot;);

	$description 		= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/ProductDescription&quot;);
	$description_attr 	= $description[0]-&gt;attributes();

	$supplier			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/Supplier&quot;);
	$supplier_attr		= $supplier[0]-&gt;attributes();

	$images 			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/ProductGallery&quot;);

	$eans				= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/EANCode&quot;);

	$featurelogo		= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/FeatureLogo&quot;);

	$spec_group			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/CategoryFeatureGroup&quot;);
	$spec_item			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/ProductFeature&quot;);

	$related 			= $xml-&gt;xpath(&quot;/ICECAT-interface/Product/ProductRelated&quot;);

	// Set product information
	$p['id'] 			= (int)$product_attr['ID'];
	$p['name']			= (string)$product_attr['Name'];
	$p['title']			= (string)$product_attr['Title'];
	$p['sku']			= (string)$product_attr['Prod_id'];
	$p['release']		= (string)$product_attr['ReleaseDate'];
	$p['img_thumb']		= (string)$product_attr['ThumbPic'];
	$p['img_small']		= (string)$product_attr['LowPic'];
	$p['img_mid']		= (string)$product_attr['Pic500x500'];
	$p['img_high']		= (string)$product_attr['HighPic'];
	$p['pdf_spec']		= (string)$description_attr['PDFURL'];
	$p['pdf_manual']	= (string)$description_attr['ManualPDFURL'];
	$p['descr_long']	= str_replace('\n','&lt;br /&gt;',(string)$description_attr['LongDesc']);
	$p['descr_short']	= (string)$description_attr['ShortDesc'];
	$p['url']			= (string)$description_attr['URL'];
	$p['warrenty']		= (string)$description_attr['WarrantyInfo'];
	$p['category'] 		= (string)$category[0]-&gt;Name[0]['Value'];
	$p['category_id']	= (int)$category[0]['ID'];

	// Set brand
	$p['brand_id'] 		= (int)$supplier_attr['ID'];
	$p['brand_name']	= (string)$supplier_attr['Name'];

	// Set images
	foreach($images[0] as $image)
	{
		$image_attr	= $image-&gt;attributes();
		$p['image'][(int)$image_attr['ProductPicture_ID']]['thumb']	= (string)$image_attr['ThumbPic'];
		$p['image'][(int)$image_attr['ProductPicture_ID']]['small']	= (string)$image_attr['LowPic'];
		$p['image'][(int)$image_attr['ProductPicture_ID']]['mid']	= (string)$image_attr['Pic500x500'];
		$p['image'][(int)$image_attr['ProductPicture_ID']]['high']	= (string)$image_attr['Pic'];
	}

	// Set EAN numbers
	foreach($eans as $ean)
	{
		$p['ean'][] = (string)$ean[0]['EAN'];
	}

	// Set featurelogos
	foreach($featurelogo as $logo)
	{
		$logo_attr = $logo-&gt;attributes();
		$p['featurelogo'][(int)$logo_attr['Feature_ID']]['image'] = (string)$logo_attr['LogoPic'];
		$p['featurelogo'][(int)$logo_attr['Feature_ID']]['descr'] = trim((string)$logo-&gt;Descriptions-&gt;Description);
	}

	// Set specification groups
	foreach($spec_group as $group)
	{
		$p['spec'][(int)$group[0]['ID']]['name'] = (string)$group-&gt;FeatureGroup-&gt;Name[0]['Value'];
	}

	// Set specifications
	foreach($spec_item as $item)
	{
		if($item[0]['Value'] != 'Icecat.biz')
		{
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item-&gt;Feature-&gt;Name[0]['ID']]['name'] = (string)$item-&gt;Feature-&gt;Name[0]['Value'];
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item-&gt;Feature-&gt;Name[0]['ID']]['value'] = (string)$item[0]['Value'];
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item-&gt;Feature-&gt;Name[0]['ID']]['sign'] = (string)$item-&gt;Feature-&gt;Measure-&gt;Signs-&gt;Sign;
			$p['spec'][(int)$item[0]['CategoryFeatureGroup_ID']]['features'][(int)$item-&gt;Feature-&gt;Name[0]['ID']]['pres_value'] = (string)$item[0]['Presentation_Value'];
		}
	}

	// Remove empty specification groups
	foreach($p['spec'] as $key=&gt;$value)
	{
		if(!isset($value['features'])){
			unset($p['spec'][$key]);
		}
	}

	// Related products
	foreach($related as $test)
	{
		$p['related'][(int)$test-&gt;Product[0]['ID']]['name'] 	= (string)$test-&gt;Product[0]['Name'];
		$p['related'][(int)$test-&gt;Product[0]['ID']]['category'] = (int)$test[0]['Category_ID'];
		$p['related'][(int)$test-&gt;Product[0]['ID']]['sku'] 		= (string)$test-&gt;Product[0]['Prod_id'];
		$p['related'][(int)$test-&gt;Product[0]['ID']]['img'] 		= (string)$test-&gt;Product[0]['ThumbPic'];
		$p['related'][(int)$test-&gt;Product[0]['ID']]['brand']	= (string)$test-&gt;Product-&gt;Supplier[0]['Name'];
		$p['related'][(int)$test-&gt;Product[0]['ID']]['brand_id']	= (string)$test-&gt;Product-&gt;Supplier[0]['ID'];
	}

	the_end:

	// Return errors if set, else product information
	if(isset($errors)){
		return $errors;
	} else {
		return $p;
	}
}
?&gt;
</pre>
<h2>Gebruik</h2>
<p>Zoals in de code staat aangegeven zijn er meerdere waardes welke ingevuld kunnen worden. Taal, gebruikersnaam en wachtwoord zijn verplicht op te geven. Daarnaast zijn er nog 4 verschillende manieren om product informatie op te vragen. Via een EAN, SKU of Icecat nummer (waarbij onderscheid wordt gemaakt tussen Open-Icecat en Full-Icecat). Daarbij een aantal voorbeelden:</p>
<h3>Via een EAN nummer</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// Get Icecat data in array by EAN number
$data = array(
	'ean'		=&gt; '4026203907966',
	'language'	=&gt; 'NL',
	'username'	=&gt; 'openIcecat-xml',
	'password'	=&gt; 'freeaccess'
);
$data = icecat_to_array($data);
echo '&lt;pre&gt;'.print_r($data,TRUE).'&lt;/pre&gt;';
?&gt;
</pre>
<h3>Via een SKU nummer</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// Get Icecat data in array by SKU number
$data = array(
	'sku'		=&gt; 'PDA01E-00101KDU',
	'brand'		=&gt; 'Toshiba',
	'language'	=&gt; 'NL',
	'username'	=&gt; 'openIcecat-xml',
	'password'	=&gt; 'freeaccess'
);
$data = icecat_to_array($data);
echo '&lt;pre&gt;'.print_r($data,TRUE).'&lt;/pre&gt;';
?&gt;
</pre>
<h3>Via een Icecat nummer (Open-Icecat)</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// Get Icecat data in array by Icecat number (Open-Icecat)
$data = array(
	'id_free'	=&gt; '10433706',
	'language'	=&gt; 'NL',
	'username'	=&gt; 'openIcecat-xml',
	'password'	=&gt; 'freeaccess'
);
$data = icecat_to_array($data);
echo '&lt;pre&gt;'.print_r($data,TRUE).'&lt;/pre&gt;';
?&gt;
</pre>
<h3>Via een Icecat nummer (Full-Icecat)</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php
// Get Icecat data in array by Icecat number (Full-Icecat)
$data = array(
	'id_full'	=&gt; '10433706',
	'language'	=&gt; 'NL',
	'username'	=&gt; 'openIcecat-xml',
	'password'	=&gt; 'freeaccess'
);
$data = icecat_to_array($data);
echo '&lt;pre&gt;'.print_r($data,TRUE).'&lt;/pre&gt;';
?&gt;
</pre>
<h2>Foutmeldingen</h2>
<p>Deze functie geeft wanneer er fouten zijn, deze terug in een array. Daarbij zijn er drie verschillende &#8220;keys&#8221;:</p>
<ul>
<li><span style="line-height: 13px;">1 = Er is iets niet opgegeven</span></li>
<li>2 = XML kan niet gedownload worden (Waarschijnlijk is Icecat in dat geval niet bereikbaar)</li>
<li>3 = Door Icecat opgegeven foutmeldingen</li>
</ul>
<h2>Resultaat</h2>
<p>Wat doet het nu eigenlijk? Het haalt de gegevens op van een product zoals hier te vinden: <a href="http://icecat.nl/p/toshiba/pda01e-00101kdu/tablets-4026203907966-at100-100-10433706.html" target="_blank">http://icecat.nl/p/toshiba/pda01e-00101kdu/tablets-4026203907966-at100-100-10433706.html</a>. Die gegevens staan in een XML welke hier te vinden is: <a href="http://openIcecat-xml:freeaccess@data.icecat.biz/export/freexml.int/NL/10433706.xml" target="_blank">http://openIcecat-xml:freeaccess@data.icecat.biz/export/freexml.int/NL/10433706.xml</a> en welke vervolgens omgezet wordt naar een array met als resultaat:</p>
<pre class="brush: plain; collapse: true; light: false; title: Resultaat van de functie; toolbar: true; notranslate">
Array
(
    [id] =&gt; 10433706
    [name] =&gt; AT100-100
    [title] =&gt; Toshiba AT100-100
    [sku] =&gt; PDA01E-00101KDU
    [release] =&gt; 2011-08-03
    [img_thumb] =&gt; http://images.icecat.biz/thumbs/10433706.jpg
    [img_small] =&gt; http://images.icecat.biz/img/norm/low/10433706-5954.jpg
    [img_mid] =&gt; http://images.icecat.biz/img/norm/medium/10433706-5954.jpg
    [img_high] =&gt; http://images.icecat.biz/img/norm/high/10433706-5954.jpg
    [pdf_spec] =&gt;
    [pdf_manual] =&gt;
    [descr_long] =&gt; &lt;b&gt;De perfecte som van alle delen&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Kijk naar HD-films. Speel games. Surf op internet. De hele dag.
    [descr_short] =&gt; 25.654 cm (10.1 &quot;) , NVIDIA Tegra 250, 16 GB SSD, 1 GB DDR2, 5.0 MP + 2.0 MP, HDMI, 802.11b/g/n, Bluetooth, Android 3.1
    [url] =&gt;  http://nl.computers.toshiba-europe.com/innovation/product/Toshiba-AT100-100/1111265/toshibaShop/false/
    [warrenty] =&gt; 2 jaar
    [category] =&gt; tablets
    [category_id] =&gt; 897
    [brand_id] =&gt; 2
    [brand_name] =&gt; Toshiba
    [image] =&gt; Array
        (
            [1149199] =&gt; Array
                (
                    [thumb] =&gt; http://images.icecat.biz/img/gallery_thumbs/10433706_838.jpg
                    [small] =&gt; http://images.icecat.biz/img/gallery_lows/10433706_838.jpg
                    [mid] =&gt; http://images.icecat.biz/img/gallery_mediums/10433706_838.jpg
                    [high] =&gt; http://images.icecat.biz/img/gallery/10433706_838.jpg
                )

            [1149200] =&gt; Array
                (
                    [thumb] =&gt; http://images.icecat.biz/img/gallery_thumbs/10433706_9614.jpg
                    [small] =&gt; http://images.icecat.biz/img/gallery_lows/10433706_9614.jpg
                    [mid] =&gt; http://images.icecat.biz/img/gallery_mediums/10433706_9614.jpg
                    [high] =&gt; http://images.icecat.biz/img/gallery/10433706_9614.jpg
                )

            [1149201] =&gt; Array
                (
                    [thumb] =&gt; http://images.icecat.biz/img/gallery_thumbs/10433706_4135.jpg
                    [small] =&gt; http://images.icecat.biz/img/gallery_lows/10433706_4135.jpg
                    [mid] =&gt; http://images.icecat.biz/img/gallery_mediums/10433706_4135.jpg
                    [high] =&gt; http://images.icecat.biz/img/gallery/10433706_4135.jpg
                )

            [1149202] =&gt; Array
                (
                    [thumb] =&gt; http://images.icecat.biz/img/gallery_thumbs/10433706_3416.jpg
                    [small] =&gt; http://images.icecat.biz/img/gallery_lows/10433706_3416.jpg
                    [mid] =&gt; http://images.icecat.biz/img/gallery_mediums/10433706_3416.jpg
                    [high] =&gt; http://images.icecat.biz/img/gallery/10433706_3416.jpg
                )

            [1149203] =&gt; Array
                (
                    [thumb] =&gt; http://images.icecat.biz/img/gallery_thumbs/10433706_427.jpg
                    [small] =&gt; http://images.icecat.biz/img/gallery_lows/10433706_427.jpg
                    [mid] =&gt; http://images.icecat.biz/img/gallery_mediums/10433706_427.jpg
                    [high] =&gt; http://images.icecat.biz/img/gallery/10433706_427.jpg
                )

            [1] =&gt; Array
                (
                    [thumb] =&gt; http://images.icecat.biz/img/feature_logo_thumbs/1-7814.png
                    [small] =&gt;
                    [mid] =&gt;
                    [high] =&gt; http://images.icecat.biz/img/feature_logo/1-7814.png
                )

        )

    [ean] =&gt; Array
        (
            [0] =&gt; 4026203907966
        )

    [featurelogo] =&gt; Array
        (
            [2183] =&gt; Array
                (
                    [image] =&gt; http://images.icecat.biz/img/feature_logo/1-7814.png
                    [descr] =&gt; Bluetooth is een open standaard voor draadloze verbindingen tussen apparaten op korte afstand. Dankzij Bluetooth kunnen bijvoorbeeld adresgegevens tussen mobiele telefoons worden uitgewisseld, kan snel vanaf een handheld computer worden geprint, of kan een mobiele telefoon worden uitgerust met een draadloze headset.
                )

        )

    [spec] =&gt; Array
        (
            [840] =&gt; Array
                (
                    [name] =&gt; Technische details
                    [features] =&gt; Array
                        (
                            [476867] =&gt; Array
                                (
                                    [name] =&gt; Kleur van het product
                                    [value] =&gt; Black
                                    [sign] =&gt;
                                    [pres_value] =&gt; Zwart
                                )

                            [476599] =&gt; Array
                                (
                                    [name] =&gt; Model
                                    [value] =&gt; Slate
                                    [sign] =&gt;
                                    [pres_value] =&gt; Slate
                                )

                        )

                )

            [830] =&gt; Array
                (
                    [name] =&gt; Processor
                    [features] =&gt; Array
                        (
                            [1036524] =&gt; Array
                                (
                                    [name] =&gt; Processor clock speed
                                    [value] =&gt; 1
                                    [sign] =&gt; GHz
                                    [pres_value] =&gt; 1 GHz
                                )

                            [852540] =&gt; Array
                                (
                                    [name] =&gt; Processor cache
                                    [value] =&gt; 1
                                    [sign] =&gt; MB
                                    [pres_value] =&gt; 1 MB
                                )

                        )

                )

            [832] =&gt; Array
                (
                    [name] =&gt; Geheugen
                    [features] =&gt; Array
                        (
                            [1036616] =&gt; Array
                                (
                                    [name] =&gt; Internal memory
                                    [value] =&gt; 1
                                    [sign] =&gt; GB
                                    [pres_value] =&gt; 1 GB
                                )

                            [476932] =&gt; Array
                                (
                                    [name] =&gt; Kloksnelheid geheugen
                                    [value] =&gt; 666
                                    [sign] =&gt; MHz
                                    [pres_value] =&gt; 666 MHz
                                )

                        )

                )

            [833] =&gt; Array
                (
                    [name] =&gt; Beeldscherm
                    [features] =&gt; Array
                        (
                            [476642] =&gt; Array
                                (
                                    [name] =&gt; Beeldschermdiagonaal
                                    [value] =&gt; 10.1
                                    [sign] =&gt; &quot;
                                    [pres_value] =&gt; 256.5 mm (10.1 &quot;)
                                )

                            [476849] =&gt; Array
                                (
                                    [name] =&gt; Resolutie
                                    [value] =&gt; 1280 x 800
                                    [sign] =&gt; Pixels
                                    [pres_value] =&gt; 1280 x 800 Pixels
                                )

                            [477013] =&gt; Array
                                (
                                    [name] =&gt; LED backlight
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [476976] =&gt; Array
                                (
                                    [name] =&gt; Touchscreen
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [476520] =&gt; Array
                                (
                                    [name] =&gt; Beeldverhouding
                                    [value] =&gt; 16:10
                                    [sign] =&gt;
                                    [pres_value] =&gt; 16:10
                                )

                        )

                )

            [847] =&gt; Array
                (
                    [name] =&gt; Aansluitingen
                    [features] =&gt; Array
                        (
                            [476908] =&gt; Array
                                (
                                    [name] =&gt; USB 2.0 poort(en)
                                    [value] =&gt; 1
                                    [sign] =&gt;
                                    [pres_value] =&gt; 1
                                )

                            [708626] =&gt; Array
                                (
                                    [name] =&gt; Mini-USB 2.0 ports quantity
                                    [value] =&gt; 1
                                    [sign] =&gt;
                                    [pres_value] =&gt; 1
                                )

                            [476606] =&gt; Array
                                (
                                    [name] =&gt; Aantal HDMI-poorten
                                    [value] =&gt; 1
                                    [sign] =&gt;
                                    [pres_value] =&gt; 1
                                )

                            [476911] =&gt; Array
                                (
                                    [name] =&gt; Luidspreker/ koptelefoon/ line-out uitgang
                                    [value] =&gt; 1
                                    [sign] =&gt;
                                    [pres_value] =&gt; 1
                                )

                            [476912] =&gt; Array
                                (
                                    [name] =&gt; Microfoon, line-in ingang
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [472519] =&gt; Array
                                (
                                    [name] =&gt; Basisstationaansluiting
                                    [value] =&gt; N
                                    [sign] =&gt;
                                    [pres_value] =&gt; Nee
                                )

                        )

                )

            [848] =&gt; Array
                (
                    [name] =&gt; Gewicht en omvang
                    [features] =&gt; Array
                        (
                            [476854] =&gt; Array
                                (
                                    [name] =&gt; Breedte
                                    [value] =&gt; 273
                                    [sign] =&gt; mm
                                    [pres_value] =&gt; 273 mm
                                )

                            [476855] =&gt; Array
                                (
                                    [name] =&gt; Diepte
                                    [value] =&gt; 177
                                    [sign] =&gt; mm
                                    [pres_value] =&gt; 177 mm
                                )

                            [476837] =&gt; Array
                                (
                                    [name] =&gt; Hoogte
                                    [value] =&gt; 15.8
                                    [sign] =&gt; mm
                                    [pres_value] =&gt; 15.8 mm
                                )

                            [476541] =&gt; Array
                                (
                                    [name] =&gt; Gewicht
                                    [value] =&gt; 765
                                    [sign] =&gt; g
                                    [pres_value] =&gt; 0.765 kg
                                )

                        )

                )

            [849] =&gt; Array
                (
                    [name] =&gt; Energie
                    [features] =&gt; Array
                        (
                            [476608] =&gt; Array
                                (
                                    [name] =&gt; AC adapter ingangsspanning
                                    [value] =&gt; 100 - 240
                                    [sign] =&gt; V
                                    [pres_value] =&gt; 100 - 240 V
                                )

                            [476609] =&gt; Array
                                (
                                    [name] =&gt; AC adapter frequentie
                                    [value] =&gt; 50/60
                                    [sign] =&gt; Hz
                                    [pres_value] =&gt; 50/60 Hz
                                )

                            [476610] =&gt; Array
                                (
                                    [name] =&gt; AC adapter uitgangsspanning
                                    [value] =&gt; 19
                                    [sign] =&gt; V
                                    [pres_value] =&gt; 19 V
                                )

                            [476611] =&gt; Array
                                (
                                    [name] =&gt; AC adapter uitgangsstroom
                                    [value] =&gt; 1.58
                                    [sign] =&gt; A
                                    [pres_value] =&gt; 1.58 A
                                )

                        )

                )

            [2678] =&gt; Array
                (
                    [name] =&gt; Netwerk
                    [features] =&gt; Array
                        (
                            [476958] =&gt; Array
                                (
                                    [name] =&gt; WLAN verbinding
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [476672] =&gt; Array
                                (
                                    [name] =&gt; Bluetooth
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [476553] =&gt; Array
                                (
                                    [name] =&gt; Draadloos
                                    [value] =&gt; 802.11b, 802.11g, 802.11n
                                    [sign] =&gt;
                                    [pres_value] =&gt; 802.11b, 802.11g, 802.11n
                                )

                            [476796] =&gt; Array
                                (
                                    [name] =&gt; Bluetooth versie
                                    [value] =&gt; 2.1+EDR
                                    [sign] =&gt;
                                    [pres_value] =&gt; 2.1+EDR
                                )

                        )

                )

            [4142] =&gt; Array
                (
                    [name] =&gt; Opslagmedia
                    [features] =&gt; Array
                        (
                            [476959] =&gt; Array
                                (
                                    [name] =&gt; Totale opslagcapaciteit
                                    [value] =&gt; 16
                                    [sign] =&gt; GB
                                    [pres_value] =&gt; 16 GB
                                )

                            [763755] =&gt; Array
                                (
                                    [name] =&gt; Opslagmedia-type
                                    [value] =&gt; SSD
                                    [sign] =&gt;
                                    [pres_value] =&gt; SSD
                                )

                        )

                )

            [7818] =&gt; Array
                (
                    [name] =&gt; Navigatie
                    [features] =&gt; Array
                        (
                            [476355] =&gt; Array
                                (
                                    [name] =&gt; GPS functie
                                    [value] =&gt; N
                                    [sign] =&gt;
                                    [pres_value] =&gt; Nee
                                )

                        )

                )

            [3489] =&gt; Array
                (
                    [name] =&gt; Besturingssysteem/software
                    [features] =&gt; Array
                        (
                            [476956] =&gt; Array
                                (
                                    [name] =&gt; Inclusief besturingssysteem
                                    [value] =&gt; Android 3.1
                                    [sign] =&gt;
                                    [pres_value] =&gt; Android 3.1
                                )

                            [476547] =&gt; Array
                                (
                                    [name] =&gt; Meegeleverde software
                                    [value] =&gt; Toshiba File Manager\nToshiba Online Manual\nToshiba Places Client\nMcAfee WaveSecure\nEvernote\nAdobe Reader\nToshiba Media Player
                                    [sign] =&gt;
                                    [pres_value] =&gt; Toshiba File Manager\nToshiba Online Manual\nToshiba Places Client\nMcAfee WaveSecure\nEvernote\nAdobe Reader\nToshiba Media Player
                                )

                        )

                )

            [4346] =&gt; Array
                (
                    [name] =&gt; Camera
                    [features] =&gt; Array
                        (
                            [623119] =&gt; Array
                                (
                                    [name] =&gt; Ingebouwde camera
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [734480] =&gt; Array
                                (
                                    [name] =&gt; Main camera resolution
                                    [value] =&gt; 5
                                    [sign] =&gt; MP
                                    [pres_value] =&gt; 5 MP
                                )

                            [475627] =&gt; Array
                                (
                                    [name] =&gt; Tweede camera
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Y
                                )

                            [708668] =&gt; Array
                                (
                                    [name] =&gt; Second camera resolution
                                    [value] =&gt; 2
                                    [sign] =&gt; MP
                                    [pres_value] =&gt; 2 MP
                                )

                        )

                )

            [7821] =&gt; Array
                (
                    [name] =&gt; Accu/Batterij
                    [features] =&gt; Array
                        (
                            [476554] =&gt; Array
                                (
                                    [name] =&gt; Batterijtechnologie
                                    [value] =&gt; Lithium-Ion (Li-Ion)
                                    [sign] =&gt;
                                    [pres_value] =&gt; Lithium-Ion (Li-Ion)
                                )

                        )

                )

            [7816] =&gt; Array
                (
                    [name] =&gt; Other features
                    [features] =&gt; Array
                        (
                            [476600] =&gt; Array
                                (
                                    [name] =&gt; Stroomvoorziening
                                    [value] =&gt; 100/240 V
                                    [sign] =&gt;
                                    [pres_value] =&gt; 100/240 V
                                )

                            [473021] =&gt; Array
                                (
                                    [name] =&gt; SIM card support
                                    [value] =&gt; N
                                    [sign] =&gt;
                                    [pres_value] =&gt; Nee
                                )

                            [476832] =&gt; Array
                                (
                                    [name] =&gt; Processorfamilie
                                    [value] =&gt; NVIDIA Tegra
                                    [sign] =&gt;
                                    [pres_value] =&gt; NVIDIA Tegra
                                )

                            [476695] =&gt; Array
                                (
                                    [name] =&gt; Front-side bus processor
                                    [value] =&gt; 333
                                    [sign] =&gt; MHz
                                    [pres_value] =&gt; 333 MHz
                                )

                            [476981] =&gt; Array
                                (
                                    [name] =&gt; SSD capaciteit
                                    [value] =&gt; 16
                                    [sign] =&gt; GB
                                    [pres_value] =&gt; 16 GB
                                )

                        )

                )

            [7823] =&gt; Array
                (
                    [name] =&gt; Card reader
                    [features] =&gt; Array
                        (
                            [476963] =&gt; Array
                                (
                                    [name] =&gt; Geïntegreerde kaartlezer
                                    [value] =&gt; Y
                                    [sign] =&gt;
                                    [pres_value] =&gt; Ja
                                )

                            [476591] =&gt; Array
                                (
                                    [name] =&gt; Compatibele geheugenkaarten
                                    [value] =&gt; MMC, SD, SDHC
                                    [sign] =&gt;
                                    [pres_value] =&gt; MMC, SD, SDHC
                                )

                        )

                )

        )

    [related] =&gt; Array
        (
            [8017370] =&gt; Array
                (
                    [name] =&gt; Stylus Pen - Black
                    [category] =&gt; 203
                    [sku] =&gt; 17741
                    [img] =&gt; http://images.icecat.biz/thumbs/8017370.jpg
                    [brand] =&gt; Trust
                    [brand_id] =&gt; 244
                )

            [8017374] =&gt; Array
                (
                    [name] =&gt; Universal Cleaning Kit
                    [category] =&gt; 367
                    [sku] =&gt; 17749
                    [img] =&gt; http://images.icecat.biz/thumbs/8017374.jpg
                    [brand] =&gt; Trust
                    [brand_id] =&gt; 244
                )

            [6944308] =&gt; Array
                (
                    [name] =&gt; AMM01
                    [category] =&gt; 203
                    [sku] =&gt; AMM01EU
                    [img] =&gt; http://images.icecat.biz/thumbs/6944308.jpg
                    [brand] =&gt; Targus
                    [brand_id] =&gt; 128
                )

        )

)
</pre>
<p>Dit resultaat kan je vervolgens verwerken in je website door deze gegevens op te slaan in een database of gewoon direct weer te geven.</p>
<h2>Array verwerken</h2>
<blockquote><p>Er komt in de toekomst nog een artikel hoe deze array verwerkt kan worden! ~<strong>Update</strong>: <a title="Deel 2, de array weergeven" href="/icecat-xml-verwerken-deel-2-de-array-weergeven/">Deel 2, de array weergeven</a></p></blockquote>
<p>Het bericht <a rel="nofollow" href="https://royduineveld.nl/icecat-xml-verwerken/">Icecat XML verwerken</a> verscheen eerst op <a rel="nofollow" href="https://royduineveld.nl">Roy Duineveld</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://royduineveld.nl/icecat-xml-verwerken/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>