Subject: | parser options are ignored |
Hi
some parser options are ignored by XML::LibXML->new(some options), XML::LibXML->load_xml(some options).
see "parser_options.t"
"parser_options.patch" is one of the solution.
regards
--
Tomita
some parser options are ignored by XML::LibXML->new(some options), XML::LibXML->load_xml(some options).
see "parser_options.t"
"parser_options.patch" is one of the solution.
regards
--
Tomita
Subject: | parser_options.t |
use strict;
use warnings;
use Test::More tests => 2;
use XML::LibXML;
my $by_accessor = XML::LibXML->new;
$by_accessor->recover(1);
my $by_args = XML::LibXML->new(
recover => 1,
);
is $by_accessor->{XML_LIBXML_RECOVER},
$by_args->{XML_LIBXML_RECOVER}, "good";
is $by_accessor->{XML_LIBXML_PARSER_OPTIONS},
$by_args->{XML_LIBXML_PARSER_OPTIONS}, "NG v1.70";
Subject: | parser_options.patch |
--- LibXML.pm 2010-01-05 18:55:30.000000000 +0900
+++ LibXML.pm.new 2010-01-05 18:54:58.000000000 +0900
@@ -363,7 +363,7 @@
$opts{no_blanks} = !$opts{keep_blanks} if exists($opts{keep_blanks}) and !exists($opts{no_blanks});
for (keys %OUR_FLAGS) {
- $self->{$OUR_FLAGS{$_}} = delete $opts{$_};
+ $self->{$OUR_FLAGS{$_}} = $opts{$_};
}
$class->load_catalog(delete($opts{catalog})) if $opts{catalog};