Hi,i have an xml files that looks like this
<?xml version="1.0" encoding="utf-8"?>
<photogallery ID="8" name="Residential">
<album ID="5" name="Leb" photogallery="Residential" date="29/10/2008" location="Lebanon" architecture="Roman" img="thumbnail_1245677486.jpg">
<picture ID="Leb" path="thumbnail_1245670921"/>
</album>
<album ID="6" name="Leb" photogallery="Residential" date="29/10/2008" location="Lebanon" architecture="Roman" img="thumbnail_1245677486.jpg"/>
<picture ID="Leb" path="thumbnail_1245670921"/>
<picture ID="Leb" path="thumbnail_1245670921"/>
</album>
<album ID="7" name="Leb" photogallery="Residential" date="29/10/2008" location="Lebanon" architecture="Roman"/>
<picture ID="Leb" path="thumbnail_1245670921"/>
<picture ID="Leb" path="thumbnail_1245670921"/>
<picture ID="Leb" path="thumbnail_1245670921"/>
<album ID="8" name="Allo" photogallery="Residential" date="2/7/1975" location="Alll" architecture="Lol">
<picture ID="Allo" path="thumbnail_1245658288"/>
<picture ID="Allo" path="thumbnail_1245658288"/>
<picture ID="Allo" path="thumbnail_1245658288"/>
<picture ID="Allo" path="thumbnail_1245673276"/>
</album>
</photogallery>
i need to get the pictures of a specific album.
i got managed a way to get to my specific album, but the problem is that im not able to get only this album children! can i do it in php? or i have to use javascript!?
this is my php code
<?php
$albid=$_GET['ID'];
$xmlFile = new DOMDocument();
$xmlFile->load("Residential.xml");
$xml_album = $xmlFile->getElementsByTagName("album");
$i = 0;
while ($xml_album->item($i)->getAttribute('ID') != $albid)
{
$i += 1;
}
$album = $xml_album->item($i);
echo ("pictures in this album are:");//my problem:D
?>
thanks.