# $Id$ # # Test of XML::Simple as a tool for encoding and decoding # # http://mirin.apnic.net/resourcecerts/wiki/index.php/IR-ISP_Definition eval 'exec perl -w -S $0 ${1+"$@"}' if 0; use strict; use XML::Simple; use Data::Dumper; my @xml = ('
','
','
[Certificate request] ','
[certificate] ','
','
','
[Readable text] '); my $xs = XML::Simple->new(KeepRoot => 1, Forcearray => [qw(list_class)]); for my $xml (@xml) { my $x = $xs->XMLin($xml); my $t = $xs->XMLout($x); print("\n###\n", $xml, "\n", Dumper($x), "\n", $t); }