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.
Victor (Guest)
on 2008-12-22 21: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
Dejan D. (Guest)
on 2008-12-22 23:35
(Received via mailing list)
On Dec 22, 7:59 pm, Victor <removed_email_address@domain.invalid> 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.