Skip Menu |
 

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

Report information
The Basics
Id: 66780
Status: new
Priority: 0/
Queue: XML-XPath

People
Owner: Nobody in particular
Requestors: javibarroso [...] gmail.com
Cc:
AdminCc:

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



Subject: XML which starts with a comment a newline after the comment is lost
Download (untitled) / with headers
text/plain 405b
Hi, there is a bug, \n after first comment (outside xml) is lost: $ cat bug-perl-xpath.pl #!/usr/bin/perl use strict; use XML::XPath; use XML::XPath::XMLParser; my $xml=<<EOX; <!-- a comment --> <a> </a> EOX my $xp = XML::XPath->new(xml => $xml); my $xml=$xp->findnodes_as_string("/") ; # $xml =~ s/-->(.)/-->\n$1/m; printf "$xml\n"; $ perl bug-perl-xpath.pl <!-- a comment --><a> </a> # THANKS !


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.