Page 1 of 1

RSS feed parsing troubles

Posted: Tue Jan 20, 2009 7:32 am
by Julien
Hi to all,

I am trying to parse an rss weather feed from the BBC like this one :

http://feeds.bbc.co.uk/weather/feeds/rs ... d/0008.xml

And the fact is that when i open the rss in the php using an fopen or even a @file(http://feeds.bbc.co.uk/weather/feeds/rs ... d/0008.xml) the result is different then what i can see if i open the source of the rss file and, more annoying, the one line telling the weather (sunny/cloudy/rainy...) is disappearing, i can't find it in my string. Do you know why this is happening, and how to deal with it ?

Re: RSS feed parsing troubles

Posted: Tue Jan 20, 2009 8:21 am
by papa

Re: RSS feed parsing troubles

Posted: Tue Jan 20, 2009 9:47 am
by Julien
Thank you, indeed, seems better.
Now a last question on the topic. How can i get my object(SimpleXMLElement)#x ?
I see there seem to be an id numerotation, which is very helpful but i can't see a function allowing me to get one of the objects easily. Am i blind ? :D

Re: RSS feed parsing troubles

Posted: Tue Jan 20, 2009 10:33 am
by pickle
Unless you're dead set on parsing the feed with code you've written yourself, I'd look at SimplePie