klacke edited this page Sep 13, 2010 · 1 revision

Here is a good example on how to get started with RSS feeds:


I made a few changes that I found in another site that seems to have made a difference. In the above example, change rss.yaws to look like this: (notice that the content type is injected in the out/1.)

out(A) ->
    case yaws_rss:retrieve(test, xml) of
        {ok, Xml} ->
            {content, "application/rss+xml", head()++Xml++tail()};
        _ ->
            {content, "text/xml", ""}

head() ->
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
 <rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
    <title>Exampel RSS feed</title>
     Bla bla....

tail() ->
"  </channel>


NOTE: when testing against a local DEV machine and using a Safari client. You should add an FQDN entry in your /etc/hosts table because Safari seems to look for the FQDN. Without it it will appear to malfunction. FireFox will work either way.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.