Forum: Ruby LibXML::XML to json in ruby

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.
B4132c2fb17f467ba38a65ff4c925d42?d=identicon&s=25 Victor (Guest)
on 2008-12-22 20:00
(Received via mailing list)
Hi

Does anyone aware of any ruby code, gem or plugin available to convert
LibXML::XML object to json?

Thanks in advance,

Victor
04952a6ee948f345e9c3727850d09a1b?d=identicon&s=25 Dejan Dimic (Guest)
on 2008-12-22 22:35
(Received via mailing list)
On Dec 22, 7:59 pm, Victor <mingde.h...@gmail.com> wrote:
> Hi
>
> Does anyone aware of any ruby code, gem or plugin available to convert
> LibXML::XML object to json?
>
> Thanks in advance,
>
> Victor

Perhaps you can use xml.to_s and then to_json or
Hash.create_from_xml and then to_json
This topic is locked and can not be replied to.