egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Parsing rss feed - Problem with listing all headlines in rss

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Jarppa
Voice


Joined: 31 Jan 2008
Posts: 1

PostPosted: Thu Jan 31, 2008 2:49 pm    Post subject: Parsing rss feed - Problem with listing all headlines in rss Reply with quote

Got it work now!

Code:
bind pub - haloo lollero

proc lollero {nick host handle chan text} {
package require tdom
package require http
set url "http://www.ampparit.com/xml.php?cat=13"
set page [::http::data [::http::geturl $url]]
set doc [dom parse $page]
set root [$doc documentElement]
set node [$root selectNodes {//item/title}]
set node2 [$root selectNodes {//channel/title}]
set text [[[lindex $node 0] childNodes] nodeValue]
set text2 [[[lindex $node2 0] childNodes] nodeValue]
putserv "privmsg #kustinihkukanava :[string trim $text2] | [string trim $text]"
}
Okay, i've got it now to show first item of rss, little bit modifying script at tcl faq area.

Problem is, that i want to list all items in rss. I've tried anything that noob like me could know. :-P However, in some cases i get this "domNode0x844713c" etc. etc. thing.

Help would be nice. :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber