Its my first time working with an XML file and I am using SimpleXML.
I am under the impression that doing $xml->dni-listings->get-listings-by-day->current->date
is possible? but I dont know how to do it. Currently the only way that I managed to do it is with the following code. but i find it too long winded for something that, surely, should be more simple?
My XML file is here http://www.dmax.it/tvl-fe/day/?type=day&channel_code=DXIT-IT&filter=1130&date=01052013
$file = file_get_contents ('http://www.dmax.it/tvl-fe/day/?type=day&channel_code=DXIT-IT&filter=1130&date=01052013');
$xml = new SimpleXMLElement ($file);
foreach($xml->children()->children() as $child)
{
echo $child->getName() . "<br />";
if ('current' == $child->getName()){
echo $child->date . "<br />";
}
}