5 Cent tip for today [ RSS Channel info ]

Started by newdep, July 16, 2004, 11:02:22 AM

Previous topic - Next topic

newdep

;;

;; version 1.0 RSS Channel info

;; (c) norman 2004

;; fixed for "<!--"



(set 'channel '(

"title" "link" "description" "language"

"copyright" "managingEditor" "webMaster" "pubDate"

"lastBuildDate" "category" "generator" "docs" ))



(set 'url "http://rss.news.yahoo.com/rss/linux">http://rss.news.yahoo.com/rss/linux")



(println "** RSS -> " url  )



(xml-type-tags nil 'cdata '!-- nil)

(set 'url (xml-parse (get-url url) (+ 1 2 8 16) ))



;; pop until rss

(until (= (first (nth 0 url)) 'rss ) (pop url))



(set 'rsschannel (nth 2 (nth 0 url)))



;;

;; Channel info -> Required CHANNEL elements: title link description

;;

(dolist (x channel)

        (if (set 'element (lookup (symbol x) rsschannel))

        (println "** RSS Channel " x " -> " element )))



(exit)



;; enjoy...
-- (define? (Cornflakes))