package XML::XML2JSON;
use strict;
our $VERSION = '0.06';
use Carp;
use XML::LibXML;
our $XMLPARSER ||= XML::LibXML->new();
=head1 NAME
XML::XML2JSON - Convert XML into JSON (and back again) using
2JSON;
my $XML = '<test><element foo="bar"/></test>';
my $XML2JSON = XML::XML2JSON->new();
my $JSON = $XML2JSON->convert($XML);
print $JSON;
my $RestoredXML = $XML2JSON->json2xml($JSON)
sed Google for inspiration: http://code.google.com/apis/gdata/json.html
In short:
=over 4
=item * The response is represented as a JSON object; each nested element or attribute is represented as a