in reply to Generating .xml file after creating xml data from XML::LibXML
Instead of
print $doc1->toString();
you do
open XML, ">some.xml"; print XML $doc1->toString(); close XML;
UPDATE: there is also a toFH function according to the documentation of XML::LibXML:
# save open my $out, '>', 'out.xml'; binmode $out; # as above $doc->toFH($out); # or print {$out} $doc->toString();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Generating .xml file after creating xml data from XML::LibXML
by balajinagaraju (Sexton) on Apr 03, 2013 at 08:39 UTC |