I have a Google merchant centre XML script which is printing additional white space within every element and I can't seem to get rid of it
I've simplified the script below to demonstrate what I'm after. 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>
Notice that the image's url is on the next line and indented which won't work. What I need is:
<feed>
<entry>
<g:image_link>http://www.mysite.com/resources/images/pic.jpg</g:image_link>
</entry>
</feed>
How can I resolve this please?