xpath('//item[@id="'.$id.'"]/gallery/image'));
if ($gallery) {
$imagecount = 0;
foreach ($gallery as $image) $imagecount++;
if ($imagecount > 0) {
echo '
';
}
for ($i = 1; $i < $imagecount; $i++) {
echo '
';
}
}
?>
xpath('/page/item/item[ position()=1 ]/background-image')));
echo '