Code: Select all
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]"
}
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. :-)