Hi,
You may do the following:
foreach ($item->title as $title) {
if ($title->prefix == 'media') {
/* title node within the media namespace */
} else {
/* standard rss title node */
}
}
Olivier
Le jeudi 5 avril 2007, Florian Hoenig a écrit :
> Hey,
>
> I have the following RSS feed:
>
> -----------------------------------------------
> <?xml version="1.0" encoding="utf-8"?>
> <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss">
> <channel>
> ....
>
> <item>
> <title>foo</title>
> <description>bar</description>
> <media:title type="plain">mediatitle</media:title>
> <media:content ....../>
> <media:thumbnail .... />
> <pubDate>2002-07-09 05:58:00</pubDate>
> </item>
>
> ....
> -------------------------------------------------
>
> Now, <title> and <media:title> do cause a collision and $item->title
> returns an array:
>
> array(2) {
> [0] => object(DOMElement)#49 (0) {
> }
> [1] => object(DOMElement)#50 (0) {
> }
> }
>
>
> I couldn't figure out a way on how to address that problem with the current
> version 0.9.1. Any suggestions?
>
> Thanks a lot,
>
> Florian