Skip Menu |

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

Report information
The Basics
Id: 75752
Status: resolved
Priority: 0/
Queue: XML-LibXML-PrettyPrint

People
Owner: Nobody in particular
Requestors: dhorne [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.002
Fixed in: (no value)



Subject: Warning on CDATA
XML::LibXML::PrettyPrinter generates carps if there is a cdata section: #!/usr/bin/perl -w use strict; use XML::LibXML; use XML::LibXML::PrettyPrint; my $doc = XML::LibXML->createDocument(); my $node = XML::LibXML::Element->new('Top'); my $cdata = $doc->createCDATASection( q{Strunk & white}); $doc->addChild($node); $node->addChild($cdata); my $pp = XML::LibXML::PrettyPrint->new(indent_string => " "); $pp->pretty_print($doc); print $doc->toString; This gives: Don't know how to handle XML::LibXML::CDATASection object at U:\temp\scripts\pp.pl line 14 <?xml version="1.0"?> <Top> <![CDATA[Strunk & white]]> </Top> However, the XML appears to be what I'd expect after being prettified, even if I add more nested nodes. Maybe XML::LibXML::CDATASection objects should be ignored....
Thanks for the bug report. I've fixed this in my repository and will get a new release out in a few minutes. CDATA sections will now be passed though untouched like comments and processing instructions currently are.