I have a google XML XML shopping center that prints extra blank space inside each element and I cannot get rid of it
I simplified the script below to demonstrate what I need. Current script:
xml.instruct! xml.feed 'xmlns' => 'http://www.w3.org/2005/Atom', 'xmlns:g' => 'http://base.google.com/ns/1.0' do @site.products.find(:all).each do |product| xml.entry do xml.g :image_link do xml.text!("http://www.mysite.com/{product.picture}"); end end end end
Outputs:
<feed> <entry> <g:image_link> http://www.mysite.com/resources/images/pic.jpg </g:image_link> </entry> </feed>
Note that the image URL is on the next line and indented, which will not work. What I need:
<feed> <entry> <g:image_link>http://www.mysite.com/resources/images/pic.jpg</g:image_link> </entry> </feed>
How can I solve this problem?
source share