rycher has asked for the wisdom of the Perl Monks concerning the following question:
<row> <field name='column1'>Homer</field> <field name='column2'>Homer Simpson</field> <field name='column3'>Nuclear Systems Operation</field> </row>
<row> <column1>Homer</column1> <column2>Homer Simpson</column2> <column3>Nuclear Systems Operation</column3> </row>
my $xml = new XML::Simple (KeyAttr=>'row'); my $data = $xml->XMLin("Employee.xml"); foreach my $e (@{$data->{row}}) { print "cn: ", $e->{column1}, "\n"; print "sn: ", $e->{column2}, "\n"; print "Department: ", $e->{column3}, "\n"; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Change MySQL 5.0 XML output to 4.0 output
by Anonymous Monk on Apr 26, 2009 at 16:07 UTC | |
by rycher (Acolyte) on Apr 27, 2009 at 02:53 UTC | |
by Anonymous Monk on Apr 27, 2009 at 03:06 UTC | |
by rycher (Acolyte) on Apr 29, 2009 at 16:14 UTC |