You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by pa...@paymybills.com on 2000/12/06 02:45:34 UTC

Re: XML::ValidWriter -> \$scaler [Was: mod_perl advocacy project

hello

for people using XML::Writer, you can write to a string by using
the IO::String module..


example:

my ($output, $io, $obj);
$io = IO::String->new($output);
tie *IO, 'IO::String';

$obj = new XML::Writer(OUTPUT => $io, DATA_MODE => 1, DATA_INDENT => 1);

.
<code to build xml>
.
.

$obj->end();

print $output;



DESCRIPTION
       The IO::String module provide the IO::File interface for
       in-core strings.  An IO::String object can be attached to
       a string, and will make it possible to use the normal file
       operations for reading or writing data, as well as seeking
       to various locations of the string.  The main reason you
       might want to do this, is if you have some other library
       module that only provide an interface to file handles, and
       you want to keep all the stuff in memory


patrick