summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/EFA.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-06-06 12:29:54 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-06-06 12:29:54 +0200
commitd986c1d60ffe91e6fdbb722936e066d8069d7cd4 (patch)
tree169c52df0813ba45394a4a014e96b6b71fa8b77c /lib/Travel/Status/DE/EFA.pm
parent0c92beaf6d81019eed8a1ce4dd2c1bb853a94645 (diff)
EFA: Add identified_data method
Diffstat (limited to 'lib/Travel/Status/DE/EFA.pm')
-rw-r--r--lib/Travel/Status/DE/EFA.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/EFA.pm b/lib/Travel/Status/DE/EFA.pm
index c134698..00338b7 100644
--- a/lib/Travel/Status/DE/EFA.pm
+++ b/lib/Travel/Status/DE/EFA.pm
@@ -247,6 +247,20 @@ sub check_for_ambiguous {
return;
}
+sub identified_data {
+ my ($self) = @_;
+
+ my $xp_place
+ = XML::LibXML::XPathExpression->new('//itdOdv/itdOdvPlace/odvPlaceElem');
+ my $xp_name
+ = XML::LibXML::XPathExpression->new('//itdOdv/itdOdvName/odvNameElem');
+
+ my $e_place = ( $self->{tree}->findnodes($xp_place) )[0];
+ my $e_name = ( $self->{tree}->findnodes($xp_name) )[0];
+
+ return ( $e_place->textContent, $e_name->textContent );
+}
+
sub lines {
my ($self) = @_;
my @lines;