views:

123

answers:

2
ruby-1.8.7-p249 > xml = Builder::XmlMarkup.new
 => <inspect/> 
ruby-1.8.7-p249 > xml.foo '<b>wow</b>'
 => "<inspect/><foo>&lt;b&gt;wow&lt;/b&gt;</foo>" 
ruby-1.8.7-p249 > 

Builder is escaping the content and is converting the b tag into an escaped value. How do I tell Builder to not escape it? I am using Ruby 1.8.7.

+1  A: 

Builder::XmlMarkup#<<

xml.foo do
  xml << '<b>wow</b>'
end
Squeegy
awesome. It too me much longer to type the question. :-)
Nadal
I can accept an answer in 8 minutes even though I got the answer in 2 minutes. :-)
Nadal
A: 

how do you get rid of the "inspect" tag?

danny