"Carlos Abalde Ramiro" <[EMAIL PROTECTED]> writes:
> I'm working with the Xerces-Perl parser to build DOM trees and then
> write XML strings (like DOMCreate.pl sample). The problem: with
> "XML::Xerces::DOMParse::print (\*STDOUT, $doc);" the output goes to
> STDOUT, but I want to store this XML output in a Perl
> string... Anyone can help me?
Hola Carlos,
Thanks for using Xerces.pm.
First, a slight explanation. DOMParse.pm was written by Tom Watson
when he wrote the original port of Xerces 1.1 for windows. I updated
it (somewhat) for the port of 1.3 to linux, but it is likely in need
of some further updating.
Second, DOMParse::print() prints to whatever filehandle you
specify. So if you pass a filehandle that is actually a string, that
is probably the simplest way to do what you want. Take a look at the
CPAN module IO::Scalar for this.
Third, DOMParse assumes the use of DOM. I have not updated it to use
the new IDOM classes (which are just an experimental more efficient
DOM implementation).
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]