$parser = XML::LibXML->new(); $EINxml = $parser->parse_file('../data/EU_SanktionGlobal.xml'); # XML Parsen $daten = $EINxml or die("Lesefehler XML Daten $!\n"); # XML-Testdaten foreach $EUListe ($daten->findnodes('WHOLE')) { $ze++; # Auslesen der Restlichen Werte # $id = ($root->findnodes('titel'))[0]->textContent: @ids = ($EUListe->findnodes('./NAME[@Id]')); $lastname = ($EUListe->findvalue('./NAME/LASTNAME')); $firstname = ($EUListe->findvalue('./NAME/FIRSTNAME')); $middlename = ($EUListe->findvalue('./NAME/MIDDLENAME')); $wholename = ($EUListe->findvalue('./NAME/WHOLENAME')); $gender = ($EUListe->findvalue('./NAME/GENDER')); $birthdate = ($EUListe->findvalue('./BIRTH/DATE')); print "$firstname $lastname $birthdate \n"; } for my $id ( @ids ) { print $id->textContent,"\n"; }