$curl = curl_init();
$timeout = 5;
$url = '가져올 xml 주소';
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $timeout);
$xml = curl_exec($curl);
curl_close($curl);
$doc = new DOMDocument();
$doc->preserveWhiteSpace = false;
$doc->loadXML( $xml);
$xpath = new DOMXpath( $doc);
// Register the itunes namespace
$xpath->registerNamespace( 'itunes', 'http://www.itunes.com/dtds/podcast-1.0.dtd');
$items = $doc->getElementsByTagName('item');
foreach( $items as $item) {
$title = $xpath->query( 'title', $item)->item(0)->nodeValue;
$type = $xpath->query( 'type', $item)->item(0)->nodeValue;
$author = $xpath->query( 'itunes:author', $item)->item(0)->nodeValue;
$update = $xpath->query( 'itunes:subtitle', $item)->item(0)->nodeValue;
$enclosure = $xpath->query( 'enclosure', $item)->item(0);
$url = $enclosure->attributes->getNamedItem('url')->value;
}정확하게 위의 소스는 iTunes 의 xml 을 가져와서 파싱하는 예제 이다.