in reply to Re^4: Building SQL Query on the fly
in thread Building SQL Query on the fly
In the meantime, I'll just say that your loop over the fetched database rows will be building (array elements within) a hash structure, and the structure will be passed to the XMLout method of your XML::Simple object. I'm not sure, but your structure loading loop might be something like this:
I'm probably missing some important details there, and I'm sorry that the XML::Simple docs are so huge. Good luck, and good night.my %xml_hash = ( rootnode => [] ); # top XML node has an empty array_r +ef as value while ( my $row = $sth->fetchrow_hashref ) { push @{$xml_hash{rootnode}}, $row; } print $xmlobj->XMLout( \%xml_hash );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Building SQL Query on the fly
by hallikpapa (Scribe) on Oct 08, 2007 at 06:28 UTC |