Try like that:
foreach ( $doc->ScheduleData->ChannelPeriod as $channelPeriod )
{
$channelId = $channelPeriod->ChannelId;
foreach ( $channelPeriod->Event as $event )
{
$beginTime = $event['beginTime'];
$programName = $event->EpgProduction->EpgText->Name;
printf( '<p>Channel: %s<br />Begin Time: %s<br />Program Name: %s</p>', $channelId, $beginTime, $programName );
}
}
It outputs:
Channel: Rai Uno
Begin Time: 20140326090000
Program Name: Unomattina storie vere
Channel: Rai Uno
Begin Time: 20140326093000
Program Name: Unomattina Verde
Also, your xml should look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<BroadcastData creationDate="20140326085217">
<ScheduleData>
<ChannelPeriod beginTime="20140326090000" endTime="20140402044500">
<ChannelId>Rai Uno</ChannelId>
<Event beginTime="20140326090000" duration="1800">
<EventId>260852180006</EventId>
<EventType>P</EventType>
<EpgProduction>
<EpgText language="eng">
<Name>Unomattina storie vere</Name>
</EpgText>
</EpgProduction>
</Event>
<Event beginTime="20140326093000" duration="1500">
<EventId>260852180007</EventId>
<EventType>P</EventType>
<EpgProduction>
<EpgText language="eng">
<Name>Unomattina Verde</Name>
</EpgText>
</EpgProduction>
</Event>
</ChannelPeriod>
</ScheduleData>
</BroadcastData>