Commits

Anonymous committed 7eff923

Modified Files:
lib/XML/LibXML/NodeList.pm
o to_literal() will cause no warnings with undefined string values!

lib/XML/LibXML//SAX/Builder.pm
o removed empty has reference from createDocument() i inserted by accident

Comments (0)

Files changed (2)

lib/XML/LibXML/NodeList.pm

 sub to_literal {
 	my $self = CORE::shift;
 	return XML::LibXML::Literal->new(
-			join('', map { $_->string_value } @$self)
+			join('', grep {defined $_} map { $_->string_value } @$self)
 			);
 }
 

lib/XML/LibXML/SAX/Builder.pm

 sub start_document {
     my ($self, $doc) = @_;
 
-    $self->{DOM} = XML::LibXML::Document->createDocument({});
+    $self->{DOM} = XML::LibXML::Document->createDocument();
 
     if ( defined $self->{Encoding} ) {
+        warn "use encoding!";
         $self->xml_decl({Version => ($self->{Version} || '1.0') , Encoding => $self->{Encoding}});
     }