Hi everyone!
I’m parsing wordpress rss, and I’m getting this
SimpleXMLElement Object
(
[title] => Hello world!
[link] => http://blog.example.com/?p=1
[comments] => http://blog.example.com/?p=1#comments
[pubDate] => Fri, 10 Aug 2012 13:41:54 +0000
[category] => SimpleXMLElement Object
(
)
[guid] => http://blog.example.com/?p=1
[description] => SimpleXMLElement Object
(
)
[enclosure] => SimpleXMLElement Object
(
[@attributes] => Array
(
=> http://blog.example.com/wp-content/uploads/2012/08/Winter-150x150.jpg
[length] => 9698
[type] => image/jpg
)
)
)
I can then get all datas from this object, but I cant get @attributes. How can I access to url?
For example to access title, I can write $rss->title, but I cant write $rss->enclosure->@attributes->url to get it.
What can I do in this case?
Thanks.