Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 29900
Status: rejected
Worked: 2 min
Priority: 0/
Queue: XML-MyXML

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

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



Subject: Doesn't parse multi-line XML -- example included.
There's something parsing which seems to be holding on to specific characters, but I can't identify which line inside MyXML is doing it. I seems like newlines are included into elements when it's accessed as part of the scalar. error: Error: The <region> element has not been closed in XML at /home/perl587/lib/site_perl/5.8.7/XML/MyXML.pm line 288 XML::MyXML::xml_to_object('<region>\x{a}', 'HASH(0x126860)') called at /home/perl587/lib/site_perl/5.8.7/XML/MyXML.pm line 155 XML::MyXML::tidy_xml('<region>\x{a}') called at ./templater.pl line 11 *****************CODE sample.xml attached example.pl : #!/usr/bin/perl use strict; use XML::MyXML qw(tidy_xml xml_to_object); use XML::MyXML qw(:all); my $file = "sample.xml"; open FILE , $file or die "Can't open $file : $!\n"; local $\ = undef; my $xml = <FILE>; print tidy_xml($xml); *************************
Subject: sample.xml
<region> </region>
From: karjala [...] karjala.org
You used the wrong variable to slurp a file - you used $\ whereas you should use $/. Hence your $xml variable only contained the first XML line. On Wed Oct 10 13:27:08 2007, theorem wrote: Show quoted text
> > local $\ = undef; >