J
John
Hi Follows,
That is first time that I am using this Data:umper 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:umper::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
That is first time that I am using this Data:umper 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:umper::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