perlCrazy has asked for the wisdom of the Perl Monks concerning the following question:
I am using xml::simple module to create xml file. have another template which is xml file. how to bring all the contents of template xml file into new xml file which is getting created ?
##Creating object for xml file my $xmls = XML::Simple->new( RootName => 'POWERMART', KeepRoot => 1, ForceContent => 1, ForceArray => ['SOURCE'] + + ); my $contents = {}; $contents->{POWERMART}->{creattion_date} = '02/08/2012'; ##Generate the xml file my $xmlFile = "test.xml"; $xmls->XMLout( $contents, xmldecl => '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n".' +<!DOCTYPE POWERMART SYSTEM "powrmart.dtd">', OutputFile => $xmlFile );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how to include xml contents in another xml file
by zentara (Cardinal) on Aug 22, 2012 at 16:07 UTC | |
|
Re: how to include xml contents in another xml file
by ig (Vicar) on Aug 22, 2012 at 18:43 UTC |