Thread XML::Simple
(2 answers)
Opened by Andreas at 2008-10-29 15:57
Schau dir mal diese Ausgabe an, dann weißt du wie die Datenstruktur ausseiht, die XML-Simple erzeugt:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 use strict; use warnings; use XML::Simple; use Data::Dumper; my $data = <<'XML'; <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <HISTORY BAUFORM="TEST" URSPRUNG="....." ART="OPTISCH" ERSTELLER="user1" ERSTELL_DATUM="12.03.2008"> <VERSION STAND="1.00" USER="user2" DATUM="2006-01-02"> <BESCHREIBUNG> Header in cle File eingespielt </BESCHREIBUNG> </VERSION> <VERSION STAND="1.01" USER="user2" DATUM="2007-04-25"> <BESCHREIBUNG> Zweite Version, irgendwas wurde geändert.... </BESCHREIBUNG> </VERSION> <VERSION STAND="1.03" USER="user3" DATUM="2008-03-02"> <BESCHREIBUNG> Dritte Version.... </BESCHREIBUNG> </VERSION> </HISTORY> XML my $parsed = XMLin($data); print Dumper($parsed); |