- From: Gijun Lee <gijun@hotmail.com>
- Date: Fri, 06 Jul 2001 15:30:41 -0000
- To: www-dom@w3.org
Hi, there!
I just got started with XML::DOM. It is very good. But I don't see many
examples on the internet site. That gets me in trouble. So, I am asking you
for help!!!!
What I am trying to do is to merge two different XML documents. If I do the
following thing, I get DOM Exception errors. It says that I am trying to do
this from two different document sources. Looks okay to me, but it seems
that I have to do something else to merge two different XML documents, but
nowhere can I find an example for this. Will anybody know how to do this?
my $parser = new XML::DOM::Parser;
my $doc = $parser->parsefile ("foo.xml");
my $ctl_doc = $parser->parse("<Sample>This is a test</Sample>");
$jobrun_info_node =
$doc->getElementsByTagName("JobRunInformation")->item(0);
$jobrun_info_node->appendChild($ctl_doc);
$doc->printToFile ("out.xml");
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
Received on Friday, 6 July 2001 11:31:13 UTC