Re: Reduced error reporting in XML::LibXML

Thomas Krichel <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
  Nicolas Mendoza writes

> Any idea why I get better diagnostics using xmllint compared to  
> XML::LibXML?
> 
> 
> $ echo -e "<a>foo\0</a>" | xmllint -
> -:1: parser error : Char 0x0 out of allowed range
> <a>foo
>        ^
> -:1: parser error : Premature end of data in tag a line 1
> <a>foo
>        ^
> 
> 
> $ echo -e "<a>foo\0</a>" | perl -wle 'use XML::LibXML; local $/; my $in =  
> <>; my $p = XML::LibXML->new(); $p->parse_string($in);'
> :1: parser error : Premature end of data in tag a line 1
> 
> 
> $ perl -wle 'use v5.10; use XML::LibXML; say $XML::LibXML::VERSION'
> 1.69

  On debian testing

krichel@trabbi:~$ perl -wle 'use v5.10.1; use XML::LibXML; say $XML::LibXML::VERSION'
1.70

krichel@trabbi:~$ echo -e "<a>foo\0</a>" | perl -wle 'use XML::LibXML; local $/; my $in = <>; my $p = XML::LibXML->new(); $p->parse_string($in);'
:1: parser error : Char 0x0 out of allowed range

<a>foo
      ^
:1: parser error : Premature end of data in tag a line 1

<a>foo
      ^

  The Char Ox0 out of range appears in the output of libxml.

  Cheers,

  Thomas Krichel                    http://openlib.org/home/krichel
                                http://authorclaim.org/profile/pkr1
                                               skype: thomaskrichel
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.