> Hi
> How can I print an XML to a file using
> XML::Xerces::DOMParse::print? it wont accpet filename in a
> string.
You can accomplish this by:
- opening a temporary file (e.g. with the file handle "TEMPFILE";
- then printing the output of the print command to this file:
XML::Xerces::DOMParse::print(\*TEMPFILE, $doc);
close TEMPFILE;
- now re-open the temporary file and read the contents into a string;
- delete the temp file.
(This is also a good time to add lines to the XML which are hard to add
to the DOM object, such as an xml version line ("<?xml version='1.0'?>")
and a DOCTYPE line.)
Regards,
Bjorn.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]