in reply to Using Perl to create XML

This isn't quite what you are looking for either, but...

One interesting approach would be to have a Data::Dumper like functionality that would output in XML format. Does anyone know if there is a moule out there that does this?

$f{foo}=[{a=>5,b=>7},{a=>1,b=>2}]; print DumperXML(\%f);
would print something like
<foo> <element> <a>5</a> <b>7</b> </element> <element> <a>1</a> <b>2</b> </element> </foo>
or something like that....

Replies are listed 'Best First'.
RE: Re: Using Perl to create XML
by btrott (Parson) on Jul 20, 2000 at 21:01 UTC
    Have you seen Data::DumpXML? It's *kind of* what you're talking about, but the resultant XML isn't quite like what you wrote.

    XML::Simple is another option. Its XMLout function takes a hash ref as an argument and dumps it in XML.