Hi all
I create the following XML file, by perl script (Showing down) , using XML::LibXML:
more test.xml
<?xml version="1.0"?>
<books>
<computer/>
</books>
My question: how to remove "xml version title":
<?xml version="1.0"?>
from the test.xml file? With DOM commands in the perl script?
in order to get only the follwoing lines in the text.xml file:
<books>
<computer/>
</books>
Yael
#the perl script:
#!/usr/bin/perl
use strict;
use warnings;
use XML::LibXML;
my $doc = XML::LibXML::Document->new;
my $root = $doc->createElement('books');
$doc->setDocumentElement($root);
my $computer = $doc->createElement('computer');
$root->appendChild($computer);
$doc->toFile('/var/tmp/test.xml');