Skip Menu |

This queue is for tickets about the XML-SAX CPAN distribution.

Report information
The Basics
Id: 15891
Status: resolved
Priority: 0/
Queue: XML-SAX

People
Owner: Nobody in particular
Requestors: suresh.kannan [...] db.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: 0.12



Subject: Latest XML::SAX (0.13) breaks XML::Simple::XMLin CDATA
When XML::Simple::XMLin is used to read in a CDATA section, a trailing '>' is found in the data. Show quoted text
zsh> cat /tmp/t.pl
my $xml = ' <foo> <bar><![CDATA[test]]></bar> </foo>'; use XML::Simple; use Data::Dumper; print Dumper XMLin($xml); --------------------------------------------- $ /perl-5.8.7/bin/perl /tmp/t.pl Unable to recognise encoding of this document at /perl-5.8.7/lib/perl5/site_perl/5.8.7/XML/SAX/PurePerl/EncodingDetect.pm line 96. $VAR1 = { 'bar' => 'test>' }; --------------------------------------------- # after reverting to XML::SAX 0.12 /perl-5.8.7/bin/perl /tmp/t.pl $VAR1 = { 'bar' => 'test' }; --------------------------------------------- Thanks...
Please test on CVS (or 0.14 when it hits CPAN). On Thu Nov 17 07:25:11 2005, guest wrote: Show quoted text
> When XML::Simple::XMLin is used to read in a CDATA section, a trailing > '>' is found in the data. >
> zsh> cat /tmp/t.pl
> my $xml = ' > <foo> > <bar><![CDATA[test]]></bar> > </foo>'; > > use XML::Simple; > use Data::Dumper; > > print Dumper XMLin($xml); > > --------------------------------------------- > $ /perl-5.8.7/bin/perl /tmp/t.pl > Unable to recognise encoding of this document at /perl- > 5.8.7/lib/perl5/site_perl/5.8.7/XML/SAX/PurePerl/EncodingDetect.pm > line 96. > $VAR1 = { > 'bar' => 'test>' > }; > > --------------------------------------------- > # after reverting to XML::SAX 0.12 > /perl-5.8.7/bin/perl /tmp/t.pl > $VAR1 = { > 'bar' => 'test' > }; > > --------------------------------------------- > > > Thanks...
On Sun Apr 23 20:12:49 2006, MSERGEANT wrote: Show quoted text
> Please test on CVS (or 0.14 when it hits CPAN).
Matt the XML::SAX bug with CDATA handling does appear to have been fixed in the 0.14 release, however the other two issues I supplied patches for in December still remain: http://aspn.activestate.com/ASPN/Mail/Message/Perl-XML/2927108 The bug is that named entities in attributes don't get expanded. So for example in this XML ... <x name="fish &and; chips">10 &gt; 5</x> ... the text content of the element will come through correctly as '10 > 5' but the attribute value will come through as 'fish &and; chips'. The other issue is the warning that is emitted if there is no XML declaration and there is whitespace before the first tag. Patches for code and tests are attached to the message linked above but I can resupply them if required. Cheers Grant
Show quoted text
> <x name="fish &and; chips">10 &gt; 5</x>
Oops, obviously that was meant to be: <x name="fish &amp; chips">10 &gt; 5</x> Cheers Grant
This is a "me too"! The problem reported here is causing XML::Simple to fail to install when only XML::SAX::PurePerl is available. XML::Simple is a Jifty dependency so now Jifty won't install. See rt.cpan.org 20485 for details.
Fixed in 0.14 release