Forum: Ruby Any way to convert from hash to XML using builder?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6fe135329ce89e00b74839a41c8e3872?d=identicon&s=25 Ehud Rosenberg (ehudros)
on 2008-10-16 16:52
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!
134ea397777886d6f0aa992672a50eaa?d=identicon&s=25 Mark Thomas (Guest)
on 2008-10-16 17:20
(Received via mailing list)
On Oct 16, 10:52 am, Ehud Rosenberg <ehud...@gmail.com> 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.
6fe135329ce89e00b74839a41c8e3872?d=identicon&s=25 Ehud Rosenberg (ehudros)
on 2008-10-16 17:23
Mark Thomas wrote:
> On Oct 16, 10:52�am, Ehud Rosenberg <ehud...@gmail.com> 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.
This topic is locked and can not be replied to.