"latitude"; "longitude"; "name"
53.58464144;8.560693391;"AK2_PKW_A_001"
53.5777080210388;8.56104893106605;"AK2_PKW_A_002"
####
####
#!/usr/bin/perl
use strict;
use warnings 'all';
use feature 'say';
use Getopt::Long;
use Getopt::Std;
use Getopt::Long qw(GetOptions);
use XML::LibXML;
use Data::Dumper;
my $filenameMap = 'test.osm';
my($dom) = XML::LibXML->load_xml(location => $filenameMap);
my $doc = $dom->documentElement;
my @children = $doc->childNodes;
my $countChildren = @children;
my @toUpdateNodes = ();
foreach my $child (@children) {
my @childFromNodes = $child->childNodes;
my $countChildFromNodes = @childFromNodes;
foreach my $childNode (@childFromNodes) {
#print $childNode->nodeType, "\n" ;
if($childNode->nodeType == XML_ELEMENT_NODE && $childNode->hasAttribute("k")) {
my $nodeVal = $childNode->getAttribute("v");
print "NodeValue: ", $childNode->getAttribute("v"), "\n";
}
}
}