You're probably using Rails 3, in which case Haml defaults to HTML5 format,
in which XML headers don't show up. You need to set :format => :xhtml for
this to work.

On Thu, Aug 26, 2010 at 8:02 AM, DAZ <[email protected]> wrote:

> I'm using the following code to generate an rss feed:
>
> !!! xml
> %feed(xmlns="http://www.w3.org/2005/Atom";)
> %title= settings.title
> %id= settings.url
> %updated= @posts.first[:created_at] if @posts.any?
> %author
>  %name= settings.author
>
>
> But the output is this:
> <feed xmlns='http://www.w3.org/2005/Atom'></feed>
> <title>Bloggl</title>
> <id>http://bloggl.com</id>
> <updated>2010-08-26T15:37:35+01:00</updated>
> <author>
>  <name>DAZ</name>
> </author>
>
> The !!! xml line doesn't seem to be producing
> <?xml version = "1.0" encoding = "UTF-8"?>
>
> Anybody know what's going wrong here?
>
> cheers,
>
> DAZ
>
> --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to