Any way to convert from hash to XML using builder?


#1

Hi all,
Am I missing an obvious way to transform a hash into an XML builder
object?
I would like the key to be the tag, and value be the content. attributes
on a tag are something I don’t really know how to represent - but
perhaps someone has already thought of that?

Thanks!


#2

On Oct 16, 10:52 am, Ehud R. removed_email_address@domain.invalid wrote:

Hi all,
Am I missing an obvious way to transform a hash into an XML builder
object?
I would like the key to be the tag, and value be the content. attributes
on a tag are something I don’t really know how to represent - but
perhaps someone has already thought of that?

Yep. http://xml-simple.rubyforge.org/

– Mark.


#3

Mark T. wrote:

On Oct 16, 10:52�am, Ehud R. removed_email_address@domain.invalid wrote:

Hi all,
Am I missing an obvious way to transform a hash into an XML builder
object?
I would like the key to be the tag, and value be the content. attributes
on a tag are something I don’t really know how to represent - but
perhaps someone has already thought of that?

Yep. http://xml-simple.rubyforge.org/

– Mark.

Thanks, I’ll check it out.