Skip Menu |

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

Report information
The Basics
Id: 31075
Status: new
Priority: 0/
Queue: XML-Mini

People
Owner: Nobody in particular
Requestors: djt_bitcard [...] thoreau-online.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Extra whitespace added with CDATA tags
When using XML::Mini to build documents, the handling of CDATA blocks is broken. Specifically, it adds whitespace to either side of whatever content you give it. This seems to be contrary to the way XML should behave, but the below diff fixes this. *** /usr/local/lib/perl5/site_perl/5.8.3/XML/Mini/Element/CData.pm 2002-11-25 17:14:37.000000000 +0000 --- CData.pm 2007-11-29 16:37:34.752878785 +0000 *************** *** 46,52 **** $spaces = $self->_spaceStr($depth); } ! my $retString = "$spaces<![CDATA[ "; if (! $self->{'_numChildren'}) { --- 46,52 ---- $spaces = $self->_spaceStr($depth); } ! my $retString = "$spaces<![CDATA["; if (! $self->{'_numChildren'}) { *************** *** 62,68 **** $retString .= $self->{'_children'}->[$i]->getValue(); } ! $retString .= " ]]>\n"; return $retString; } --- 62,68 ---- $retString .= $self->{'_children'}->[$i]->getValue(); } ! $retString .= "]]>\n"; return $retString; }