Permalink
Browse files

Updated RSS documentation.

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@915 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
Tobbe Tornquist
Tobbe Tornquist committed Sep 16, 2005
1 parent 532b105 commit e1cb0d1954db282c9f34acca012b372e40570431
Showing with 16 additions and 13 deletions.
  1. +16 −13 doc/README.rss
View
@@ -41,29 +41,32 @@ could look something like this:
rss.yaws
========
-<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <channel>
- <title>Exampel RSS feed</title>
- <link>http://www.blaha.org/</link>
- <description>
- Bla bal....
- </description>
- <language>iso8859-1</language>
-
<erl>
out(A) ->
case yaws_rss:retrieve(test, xml) of
{ok, Xml} ->
- {html, [Xml]};
+ {content, "text/xml", head()++Xml++tail()};
_ ->
- {html, ""}
+ {content, "text/xml", ""}
end.
+head() ->
+"<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
+ <channel>
+ <title>Exampel RSS feed</title>
+ <link>http://www.blaha.org/</link>
+ <description>
+ Bla bla....
+ </description>
+ <language>iso8859-1</language>".
+
+tail() ->
+" </channel>
+</rss>".
+
</erl>
- </channel>
-</rss>
========
To insert RSS items into the feed from your application, you

0 comments on commit e1cb0d1

Please sign in to comment.