concept47
concept47

Reputation: 31726

ruby on rails xml builder question

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

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

Upvotes: 1

Views: 985

Answers (1)

Greg Campbell
Greg Campbell

Reputation: 15292

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

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

Upvotes: 3

Related Questions