使用simplepie在RSS feed的图片标签中解析图片的网址

时间:2019-01-17 05:14:58

标签: php xml rss feed simplepie

我对RSS feed和simplepie还是陌生的,我可以使用simplepie库解析一些feed,非常感谢,但是现在我面临image tag()下的tag问题,我不知道如何解析这个,我在simplepie库中没有看到直接的方法

foreach ($feed->get_items() as $item){
        $title=$item->get_title();
        $description=$item->get_description();
      // Now I need image url from inside the <image> tag

}

这是我的RSS feed

<image>
        <url>https://s0.wp.com/i/buttonw-com.png</url>
        <title>Gods of Advertising</title>
        <link>https://godsofadvertising.wordpress.com</link>
    </image>

我已经搜索了答案,但没有得到正确的答案,我们将不胜感激。

0 个答案:

没有答案