(set 'RSS '((rss
(@
(version "0.92"))
(channel
(docs "http://backend.userland.com/rss092")
(title "newLISP Fan Club")
(link "http://www.alh.net/newlisp/phpbb/")
(description "Friends and Fans of newLISP ")
(managingEditor "dooright101@yahoo.com")
(webMaster "dooright101@yahoo.com")
(lastBuildDate "Mon, 10 Jul 2006 22:40:58 GMT") ))))
;use ref to find the indices of something:
> (ref 'channel RSS)
(0 2 0)
>
; try it
> (RSS 0 2 0)
channel
>
; strip of the last index number to extract the channel members
> (RSS 0 2)
(channel (docs "http://backend.userland.com/rss092") (title "newLISP Fan Club")
(link "http://www.alh.net/newlisp/phpbb/")
(description "Friends and Fans of newLISP ")
(managingEditor "dooright101@yahoo.com")
(webMaster "dooright101@yahoo.com")
(lastBuildDate "Mon, 10 Jul 2006 22:40:58 GMT"))
; taking the rest of it gives you just the channel members
> (set 'CHN (1 (RSS 0 2)))
((docs "http://backend.userland.com/rss092") (title "newLISP Fan Club")
(link "http://www.alh.net/newlisp/phpbb/")
(description "Friends and Fans of newLISP ")
(managingEditor "dooright101@yahoo.com")
(webMaster "dooright101@yahoo.com")
(lastBuildDate "Mon, 10 Jul 2006 22:40:58 GMT"))
>
; on this you could use assoc to find something:
> (assoc 'link CHN)
(link "http://www.alh.net/newlisp/phpbb/")
> (assoc 'webMaster CHN)
(webMaster "dooright101@yahoo.com")
>
since the ((rss ... stuff is in a file. For now I'm doing what you're doing, and copying the SXML into a (set ... expression. But I couldn't work out how to get a file containing this into a symbol...
That's the one! I feel better now, because I never tried that ... :-)
This works for the short example file that you gave. I am trying to make it work with a longer SXML file now - assuming there's no size limit for eval-string, it might just be some formatting that's gone adrift...