4 ms·
syntax doesn't matter, I think. Everything can be re-defined in Lisp style if needed. Yes, you're right. You might be interested in this: http://www.pmsf.de/r
by dpapathanasiou 19y ago
syntax doesn't matter, I think. Everything can be re-defined in Lisp style if needed.
Yes, you're right.
You might be interested in this: http://www.pmsf.de/resources/lisp/expat.html http://www.pmsf.de/resources/lisp/expat.html
If you use Mai's modified expat, you can convert any feed into s-expressions, preserving all attributes and namespaces.
Here's a quick example.
This is the beginning of the xml for the news.yc feed:
<rss version="2.0"><channel><title>Startup News</title><link>http://news.ycombinator.com</link><description>The http://news.ycombinator.com</link><description&#... most interesting startup-related links,
as determined by readers.</description><item><title>PG: If starting viaweb today, would you use lisp?</title><link>http://news.ycombinator.com/item?id=36905</link><comments>http://news.ycombinator.com/item?id=36905</comments></item> http://news.ycombinator.com/item?id=36905</link><...;
And here's the expat-parsed, s-expression:
(("rss" "version" "2.0")(("channel")(("title")"Startup News")(("link")"http://news.ycombinator.com http://news.ycombinator.com")(("description")"The most interesting startup-related links, as determined by readers.")(("item")(("title")"PG: If starting viaweb today, would you use lisp?")(("link")"http://news.ycombinator.com/item?id=36905 http://news.ycombinator.com/item?id=36905")(("comments")"http://news.ycombinator.com/item?id=36905 http://news.ycombinator.com/item?id=36905"))
- mojuba 19y agoThanks. I wonder if quotes can be omitted to make it slightly more readable. Anyway, this idea obviously needs some effort for improvement before it can be brought to market, so to say.