Data::Dumper output the results in single quote.

J

John

Hi Follows,
That is first time that I am using this Data::Dumper module to create
an XML file. I don't know why that I am seeing single quote at the
beginning and the end of output file. such as:
"
'<?xml version="1.0"?>
<Properties>
<Edit></Edit>
<Priority>1</Priority>
<WhereUsed></WhereUsed>
</Properties>
'
"

And here is part of my code to output that XML file:
"
sub updateXML {

local $Data::Dumper::Terse = 1;
my $inData = $xml->XMLin("properties.xml");
$inData->{Priority} = 1;

my $outXml = new XML::Simple;
my $outData = $outXml->XMLout($inData, Rootname => "Properties",
noattr=> 1, xmldecl=> '<?xml version="1.0"?>');

my $file = "properties.xml";

open my $HR, ">", $file or die "can not open $file $!";

print Dumper($outData);
print $HR Dumper($outData);
close $HR;

" ,

And when I debug it, I don't see such single quote on that $outData
value, not sure why I have such things in the generated XML file ?

Does anyone know how to get rid of that ?



Chun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top