Quantcast
Channel: Perl XML::Twig send final output to JSON - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by mirod for Perl XML::Twig send final output to JSON

my $output = $twig->print;I think you want my $output = $twig->sprint;there, so you get the string back instead of the twig object (thanks simbabque)this will just output the variable as a JSON...

View Article



Answer by simbabque for Perl XML::Twig send final output to JSON

XML::Twig has a simplify method that works similar to XML::Simple (which should not be used!). You could use that, but it's not very helpful for your example.my $json = JSON->new->allow_nonref;my...

View Article

Perl XML::Twig send final output to JSON

I have the following code that erases the soap envelope and body of and XML string keeping the root and I want to take the final output and send to JSON. -thanks use XML::Twig;use JSON;$xml =...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images