Dear Gaal & Sawyer
Sorry but I need to clarify my question , you right about your example , its 
good example to remove the XML version by shift
But my final target is to create right  XML format
Please look on the following perl example: createXML.pl script

#!/usr/bin/perl

use warnings;
use XML::LibXML;


my $doc  = XML::LibXML::Document->new;
my $root = $doc->createElement('LEVEL1');
$doc->setDocumentElement($root);

my $system = $doc->createElement('LEVEL2');
$root->appendChild($system);

my $install = $doc->createElement('LEVEL3');
$system->appendChild($install);

my @lines = split /\n/, $doc->toString;
shift @lines;

foreach (@lines) {
print "$_ \n";

 }

The output from createXML.pl script is:
<LEVEL1><LEVEL2><LEVEL3/></LEVEL2></LEVEL1>

But we want the following XML format:
<LEVEL1>
   <LEVEL2>
    <LEVEL3/>
   </LEVEL2>
</LEVEL1>
I add the:
my @lines = split /\n/, $doc->toString;
shift @lines;

foreach (@lines) {
print "$_ \n";

 }

 but as you see the XML format still as:
<LEVEL1><LEVEL2><LEVEL3/></LEVEL2></LEVEL1>
Please advice
THX
Uri




  ________________________________
"This e-mail message may contain confidential, commercial or privileged 
information that constitutes proprietary information of Comverse Technology or 
its subsidiaries. If you are not the intended recipient of this message, you 
are hereby notified that any review, use or distribution of this information is 
absolutely prohibited and we request that you delete all copies and contact us 
by e-mailing to: secur...@comverse.com. Thank You."
_______________________________________________
Perl mailing list
Perl@perl.org.il
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to