I'm using Ruby On Rails' RXML to create a sitemap feed for Google.
Google requires that images are marked up with the image name space, requiring an element that has a semicolon in it like this:
<image:image>
<image:loc>http://ift.tt/Sqn21r;
</image:image>
If I use
xml.image:loc => "something"
I get
<image:image>
<image loc="something"/>
</image:image>
If I use xml.image:loc("something")
I get
compile error
/home/vagrant/website/app/views/feeds/sitemap.rxml:36: syntax error, unexpected '(', expecting kEND
xml.image:loc("something")
If I try this
xml.image:loc do
puts "something"
end
I get this
<image:image>
<image:loc>
</image:loc>
</image:image>
No comments:
Post a Comment