| Data-Serializer documentation | Contained in the Data-Serializer distribution. |
Data::Serializer::XML::Simple - Creates bridge between Data::Serializer and XML::Simple
use Data::Serializer::XML::Simple;
Module is used internally to Data::Serializer
Any options are passed through to XML::Simple. See XML::Simple(3) for details.
Neil Neely <neil@neely.cx>
Copyright 2004 by Neil Neely. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1), Data::Serializer(3), XML::Simple(3).
| Data-Serializer documentation | Contained in the Data-Serializer distribution. |
package Data::Serializer::XML::Simple; BEGIN { @Data::Serializer::XML::Simple::ISA = qw(Data::Serializer) } use warnings; use strict; use XML::Simple qw(); use vars qw($VERSION @ISA); $VERSION = '0.03'; sub serialize { my $self = (shift); my %options = ref $self->{options} eq 'HASH' ? %{$self->{options}}: (); my $xml = XML::Simple->new(keyattr => [ 'name'], %options); return $xml->XMLout( (shift) ); } sub deserialize { my $self = (shift); my %options = ref $self->{options} eq 'HASH' ? %{$self->{options}}: (); my $xml = XML::Simple->new(keyattr => [ 'name'], %options); return $xml->XMLin( (shift) ); } 1; __END__ #