summaryrefslogtreecommitdiff
path: root/lib/Travel/Status/DE/VRR.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travel/Status/DE/VRR.pm')
-rw-r--r--lib/Travel/Status/DE/VRR.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/Travel/Status/DE/VRR.pm b/lib/Travel/Status/DE/VRR.pm
index e16136f..47b3b76 100644
--- a/lib/Travel/Status/DE/VRR.pm
+++ b/lib/Travel/Status/DE/VRR.pm
@@ -98,6 +98,21 @@ sub new {
return $self;
}
+sub new_from_html {
+ my ( $class, %opt ) = @_;
+
+ my $self = { html => $opt{html}, };
+
+ $self->{tree} = XML::LibXML->load_html(
+ string => $self->{html},
+ recover => 2,
+ suppress_errors => 1,
+ suppress_warnings => 1,
+ );
+
+ return bless( $self, $class );
+}
+
sub errstr {
my ($self) = @_;