NAME
XML::Registry - Perl module for loading and saving an XML registry.
SYNOPSIS
use XML::Parser;
use XML::Registry;
# create a new XML::Parser instance using Tree Style
$parser = new XML::Parser (Style => 'Tree');
# create new instance of XML::Registry
$dump = new XML::Registry;
# Convert XML Registry to Perl code
$tree = $parser->parsefile($file);
$tree = $parser->parse('<foo id="me">Hello World</foo>');
# print the results
print $dump->xml2pl($tree);
# Convert Perl code to XML Registry
# read file in Data::Dumper format
open(PL,$file) || die "Cannot open $file: $!";
$perl = eval(join("",<PL>));
# print the results
print $dump->pl2xml($perl);
DESCRIPTION
XML::Registry can dump an XML registry to Perl code using Data::Dumper, or dump Perl code into an XML registry.
This is done via the following 2 methods: XML::Registry::xml2pl XML::Registry::pl2xml
This module was originally written for an article in TPJ. It was an exercise in using the XML::Parser module.
AUTHOR
Jonathan Eisenzopf, eisen@pobox.com
SEE ALSO
perl(1), XML::Parser(3).