So I have an xml doc being generated based on product info in rails (using the builder markup (http://builder.rubyforge.org/classes/Builder/XmlMarkup.html), but when I use builders namespace syntax, the value I want to print is absent. Here's the code:
xml.tag!("rrs", {"xmlns:g"=>"http://base.google.com/ns/1.0"}) do
@products.each do |p|
xml.item do
xml.id p.id # This works and prints: <id>123</id>
xml.tag!("g:id") { p.id } # This DOESN'T work and prints: <g:id></g:id>
end
end
end
Notice that the p.id isn't printed when I use the .tag! as the docs say to.
Is this a simple syntax issue I'm screwing up?
Thanks in advance!