On Wednesday, April 18, 2001, at 10:43 AM, Ideshini Naidoo wrote:
> Does anyone know how to extract an entire structure from a DOM tree
> and return the structure in XML format in a char *.
You can do that by editing the DOMPrintFormatTarget class in the
DOMPrint sample. (Look in the DOMPrint.cpp file.) Add a buffer and
replace the cout.write() with code to append the transcoded text as
it's passed into DOMPrintFormatTarget::writeChars().
Or you can change the cout.write() to write to a different stream.
Be sure to set up and initialize the stream in
DOMPrintFormatTarget's constructor. (Or pass in a reference to an
initialized stream when you construct the FormatTarget object.)
Just be aware that the data passed to writeChars() may not be NULL
terminated. Don't use the "<<" operator to write the data!
--Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]