XML::Parser bug in comment xml code?

Todd Rinaldo <[email protected]> Fri, 11 Nov 2011 09:26:31 -0600
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
I'm forwarding a bug report I got outside of RT against XML::Parser. I took over, primarily to fix non-xml related bugs in the module and am not an XML expert by any means. 

My question to the list is quite simply: Is this well formed XML?

<!--<cmdline><![CDATA[--]]></cmdline>-->

Begin forwarded message:

> I found a strange bug that occurs when a XML commented out code contains a '--'
> Here is a small script that shows the problem:
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use XML::Simple;
> use Data::Dumper;
> 
> my $xml_string = '<!--<cmdline><![CDATA[--]]></cmdline>-->';
> my $xml_obj = XML::Simple->new();
> my $xml = $xml_obj->XMLin($xml_string);
> print Dumper($xml);
> 
> This example produces an error:
> 
> not well-formed (invalid token) at line 1, column 24, byte 24 at /usr/lib/perl5/XML/Parser.pm line 187


_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs