How to read the xml file in wordpress?

WordPress bundles and wraps SimplePie class for feed download, caching and processing. Retrieving namespaced data with it would be something like this:

$feed  = fetch_feed( 'http://www.wdcdn.net/rss/presentation/library/client/iowa/id/128b053b916ea1f7f20233e8a26bc45d' );
$items = $feed->get_items();

foreach ( $items as $item ) {

    $credit = $item->get_item_tags( 'http://search.yahoo.com/mrss/', 'credit' );
    var_dump( $credit );
}

See fetch_feed() in Codex.

Leave a Comment