Create a MemBufFormatTarget, pass it to DOMWriter::writeNode() (specifying your document node for the node parameter), then use MemBufFormatTarget::getRawBuffer() and MemBufFormatTarget::getLen() to get the buffer and its size. Assuming the document's encoding is set to UTF-8, you'll get UTF-8 in the buffer.
> -----Original Message----- > From: Matthias Niggemeier [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 23, 2005 10:45 AM > To: [email protected] > Subject: Writing to String > > Hi there! > I have to write my XML-Doc in a file and in a database. > Since I do not want to read the file back, I searched a bit > and found DOMWriter->writeToString(...) > Unfortunately, this method always returns UTF-16, but my file > is UTF-8 and the entry in the database should be exactly the > same as in the file. How can I achieve this? > (Since the program produces a huge number of xml-files every > run, re-reading the file is not an option.) > > Regards > > Matthias --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
