XML::Simple

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]

#!/usr/local/bin/perl

use strict;
use warnings;
use XML::Simple;
use Data::Dumper;

my $file = XMLin("adr.xml", forcearray => 0);
print Dumper($file);

$addresses = {
   'person' => [ {
      'city' => 'Laupheim',
      'country' => 'Germany',
      'name' => {
         'first' => 'Ingo',
         'last' => 'Melzer'
      }
   }, {
      'city' => 'Lonsee',
      'country' => 'Germany',
      'name' => {
         'first' => 'Andreas F.',
         'last' => 'Borchert'
      }
   } ]
};

Ein Perl Programm und die Ausgabe.

 [Vorheriges Kapitel]  [Vorherige Seite]  [Inhaltsverzeichnis]  [Nächste Seite]  [Nächstes Kapitel]
Copyright © 2003 Ingo Melzer, in HTML konvertiert am 18.01.2004