on showAll () { local (s = "", i);; on cData (text) { return "";}; on tag(tag, text) { return "<" + tag + ">" + text + "";}; on postTitle (post, title = "") { if defined (post.title) { title = post.title}; return tag("ptitle", title);}; on postLink (post, link = "") { if defined (post.link) { link = cdata(post.link)}; return tag("plink", link);}; on postCategories (post, cats = "") { local (adrcats = post.categories);; for adr in @adrcats { local (name = nameOf(adr^)); local (adrcat= @adrblog^.categories.[name]);; if (defined (adrcat) && defined (adrcat^.htmlUrl)) { cats = cats + tag("category", name);}}; return tag("categories", cats);}; on postText (post) { return tag("text", cData(string(post.text)))}; local (adrblog = radio.weblog.init ());; local (adrposts = @adrblog^.posts);; for i = sizeof (adrposts^) downto 1 { local (adrpost = @adrposts^ [i]);; local (url); radio.weblog.getUrlForPost (adrpost, @url);; local (thisdate = adrpost^.when);; s = s + "";; s = s + tag("date", thisdate) + postTitle(adrpost^) + postLink(adrpost^) + postCategories(adrpost^) + postText(adrpost^);; s = s + "";}; s = tag("allposts", s);; return (s); }