PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
XML_RSS: accessing to attributes and subnodes

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR
View previous topic :: View next topic  
Author Message
BlueHeaven



Joined: 18 Nov 2008
Posts: 1

PostPosted: Tue Nov 18, 2008 10:10 am    Post subject: XML_RSS: accessing to attributes and subnodes Reply with quote

Please can someone tell me if with pear XML_RSS I can access to attribute values and how?
example:
<item about="9632">
I would like to retrieve "about" value.

And I have a secon question.
In my rdf document I have severals "image" elements UNDER the each "item" element (they are subnodes). I need to access to those image elements for each item. The getImages() function is unuseless because it gets all the images together and it cannot be understood which element they belong to.
example:
<item rdf:about="http://www.atpress.ne.jp/view/9632">
<dc:date>2008-11-11T13:22:27+09:00</dc:date>
<title>Here the title</title>
<link>http://www.xyz.com/view/9632</link>
<description>bla bla bla</description>
<image rdf:about="http://www.xyz.com/uploadimages1fd491a1eb4.jpg">
<title>img1</title>
<url>http://www.atpress.ne.jp/uploadimages/1fd491a1eb4.jpg</url>
</image>
<image rdf:about="http://www.xyz.com/uploadimages1fd491a1eb7.jpg">
<title>img2</title>
<url>http://www.atpress.ne.jp/uploadimages/1fd491a1eb7.jpg</url>
</image>
<image rdf:about="http://www.xyz.com/uploadimages1fd491a1eb1.jpg">
<title>img3</title>
<url>http://www.atpress.ne.jp/uploadimages/1fd491a1eb1.jpg</url>
</image>
</item>

PS: As I needed to access to other item subelements not mentioned above and not included in the "default" list. So I added those ones to the $itemTags array (rss.php), and everything perfectly works. But if I add the index "IMAGE" it causes an"undefined index" error. WHY???

Thank you very much you will give me an help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> PEAR All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement