2 ===================================================================
3 --- gpst (revision 1761)
4 +++ gpst (working copy)
8 use Time::Local qw { timegm_nocheck };
18 - my $Txt = join("", @_);
19 + D("Inn i read_xmlfile()");
20 + my $Txt = XMLin(@_);
22 + # print(Dumper($Txt->{trk}->{trkseg}->{trkpt}->[0]->{time}));
26 + for (my $a = 0; $Loop; $a++) {
28 + my $Date = $Txt->{trk}->{trkseg}->{trkpt}->[$a]->{time};
29 + $Dat{'lat'} = $Txt->{trk}->{trkseg}->{trkpt}->[$a]->{lat};
30 + $Dat{'lon'} = $Txt->{trk}->{trkseg}->{trkpt}->[$a]->{lon};
31 + $Dat{'ele'} = $Txt->{trk}->{trkseg}->{trkpt}->[$a]->{ele};
32 + if ($Date =~ m#(\d\d\d\d)-?(\d\d)-?(\d\d)T(\d\d):?(\d\d):?(\d\d)\.?(\d*?)Z#) {
33 + ($Dat{'year'}, $Dat{'mon'}, $Dat{'day'},
34 + $Dat{'hour'}, $Dat{'min'}, $Dat{'sec'}, $Dat{'secfrac'}) =
39 + # print($Txt->{trk}->{trkseg}->{trkpt}->{time}->[$a]);
41 # FIXME: The sequential stuff here is probably bad, but easy.
42 - $Txt =~ s#(<gpx\b.*?>.*?</gpx>)#print_gpx($1)#gse;
43 - $Txt =~ s#(<gps\b.*?>.*?</gps>)#print_xml_gps($1)#gse;
44 + # $Txt =~ s#(<gpx\b.*?>.*?</gpx>)#print_gpx($1)#gse;
45 + # $Txt =~ s#(<gps\b.*?>.*?</gps>)#print_xml_gps($1)#gse;