Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make XML parsing more robust

  • Loading branch information...
commit 9fe20a393447962b762e520761452a5898539793 1 parent 21cc1c7
@moritz authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Mowyw/Datasource/XML.pm
View
4 lib/Mowyw/Datasource/XML.pm
@@ -24,9 +24,9 @@ sub _read_data {
my ($self, $file) = @_;
my $data;
if (exists $self->{OPTIONS}{root}){
- $data = XMLin($file, ForceArray => [ $self->{OPTIONS}{root} ]);
+ $data = XML::Simple->new->parse_file($file, ForceArray => [ $self->{OPTIONS}{root} ]);
} else {
- $data = XMLin($file);
+ $data = XML::Simple->new->parse_file($file);
}
if (reftype $data eq 'ARRAY'){
return $data;
Please sign in to comment.
Something went wrong with that request. Please try again.