in reply to Re^2: Reading XML LibXML
in thread Reading XML LibXML
use strict; use warnings; use XML::Simple; my $xml = <<XML; <table> <Entry No="1"> <lastname_>Dasd</lastname_> <firstname_>Dasd</firstname_> <street_>Dasd</street_> <houseno_>12</houseno_> <zip_>1231</zip_> <city_>Dasd</city_> <sex_>maennlich</sex_> <marital_>geschieden</marital_> <character_>Brille Sommersprossen</character_> <description_>asdas </description_> </Entry> <Entry No="2"> <lastname_>Dasd</lastname_> <firstname_>Dasd</firstname_> <street_>Dasd</street_> <houseno_>12</houseno_> <zip_>1231</zip_> <city_>Dasds</city_> <sex_>maennlich</sex_> <marital_>geschieden</marital_> <character_>Brille Sommersprossen</character_> <description_>asdas </description_> </Entry> </table> XML my $data = XMLin( $xml ); my @info = @{$data->{'Entry'}}; for my $entry (@info){ print "$entry->{lastname_}, $entry->{firstname_}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Reading XML LibXML
by McA (Priest) on Oct 02, 2013 at 11:07 UTC | |
by hdb (Monsignor) on Oct 02, 2013 at 11:11 UTC | |
by McA (Priest) on Oct 02, 2013 at 11:16 UTC | |
by hdb (Monsignor) on Oct 02, 2013 at 11:20 UTC | |
by McA (Priest) on Oct 02, 2013 at 11:29 UTC | |
| |
|
Re^4: Reading XML LibXML
by Anonymous Monk on Oct 02, 2013 at 11:08 UTC |