Front page | perl.beginners |
Postings from December 2002
Adding root node
Thread Next
From:
Sorin Marti
Date:
December 23, 2002 04:32
Subject:
Adding root node
Message ID:
3E070230.8030209@semafor.ch
Hi all,
I've written a very simple script which puts xml-documents together...
Now I want to add a root node at the beginning and one at the end.
<root>
[....content....]
</root>
How do I do that?
#/usr/bin/perl
while( @ARGV ){
$filename=shift @ARGV;
open( DATEI, "<$filename" );
while( <DATEI> ){
print unless ( m/^<\?xml / || m/^<!DOCTYPE/ );
}
}
THX
Sorin
Thread Next
-
Adding root node
by Sorin Marti