views:

164

answers:

1

Anybody know how to produce an xml element like this in rails using xml Builder?
<image:loc>http://example.com/image.jpg&lt;/image:loc&gt;

xml.image :loc http://example.com/image.jpg
Is supposed to work but doesn't.

+1  A: 

You're pretty close, but the correct syntax is:

xml.image :loc, "http://example.com/image.jpg"
Greg Campbell