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>