("as_2586" ("as_2587" ("as_2588" ("as_2637" ("as_2638" ("as_2639")) ("as_2640")) ("as_2595")) ("as_2589")))
Equals:
Sub Projects
* 200705_PSC_Trinity (Construction)
o as_2587 (Client Approval)
+ as_2588 (Building Permit)
# CD Set (Deliverable)
* A-110 (Deliverable)
o 1. Site Plan (Deliverable)
* PSC Survey Info (Building Surveying)
# as_2595 (Systems Coordination)
+ as_2589 (Programming)What I'm looking for is a clearly defined syntax, character sets, metachchacters, etc for Lisp-like representation of data.
Yes, you're right.
You might be interested in this: 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... 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><...;
And here's the expat-parsed, s-expression:
(("rss" "version" "2.0")(("channel")(("title")"Startup News")(("link")"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")(("comments")"http://news.ycombinator.com/item?id=36905"))
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.
'(root (child-1 attr1: val1 attr2: val2)
(child-2 attr1: val1 attr2: val2)
(child-3 attr1: val1 attr2: val2))
And then recurse over it?BTW, If I'm wrong please teach me :D