Say I want to output XML like this:123 apple banana pear lemon
Is there a way of doing that with to_xml?
It seems like there’s two problems: to_xml always creates a wrapping
element when it encounters an array, and…
You can put plain strings into hash values and it works, but plain
strings in arrays doesn’t work. That’s this guy’s problem again
Maybe I should look at using Builder instead. Seems it gives me power
over the XML output, but my code builds up a nested hash/array
structure. Dont I end up embedding knowledge of that structure in two
different places. Also from my hash I wanted to generate JSON too. Is
there an approach converting from an XML doc object to JSON? or some
other way I should be thinking about this?