ezekiel has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to produce a simple XML document from the CGI parameters submitted in a form. This is basically what I'm doing:
my $xs = new XML::Simple(); my $elements = $cgi->Vars(); my $xml = $xs->XMLout( $elements, rootname => 'source' );
So $elements is a reference to a hash where the key is the CGI parameter and the value is the value associated with that parameter. The CGI parameters I don't want in the XML are prefixed with "-" which according to the XML::Simple docs should omit them from the XML.
The problem is the contents of $xml look like this: <source></source> ie no elements get written into the output. Can anyone offer some advice as to what I have missed?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML from CGI parameters
by BrowserUk (Patriarch) on Jul 23, 2002 at 07:02 UTC | |
by Aristotle (Chancellor) on Jul 23, 2002 at 13:38 UTC | |
|
Re: XML from CGI parameters
by PodMaster (Abbot) on Jul 23, 2002 at 07:03 UTC |