This is a way to get "printed form".
What I'm asking is something like:
$parser = XML::Xerces::DOMParser->new();
$parser->parse('myfile.xml');
$doc = $parser->getDocument();
# add stuff to document
my $string = $doc->serialize();
#Write $string in the parsed file which is 'myfile.xml'
An intelligent way, without loosing effciency
like removing the existing file and creating another one with the same name
(Nooo!!!)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 7:54 PM
To: [EMAIL PROTECTED]
Subject: Re: write the DOM tree in the file!
"BENHAJ-ABDELLATIF,TAHIA (HP-France,ex1)" <[EMAIL PROTECTED]>
writes:
> How can we write the modifications in a file once we did after
> parsing? Modification like create node or remove node.
Hi Tahia,
You can use the serialize() method of DOM_Node on the Document node.
$parser = XML::Xerces::DOMParser->new();
$parser->parse('myfile.xml');
$doc = $parser->getDocument();
# add stuff to document
my $string = $doc->serialize();
print STDOUT $string;
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]