Xerces output stream

S

shaun

Xerces-C++ appears to have different methods for 1) Output to file and
2)Output to screen, namely (cut and paste from code):

LocalFileFormatTarget target(X(fileName.c_str()));
pWriter->setEncoding(X("UTF-8"));
pWriter->writeNode(&target, *m_pDoc);



XMLFormatTarget * pTarget=new StdOutFormatTarget();
pSerializer->setNewLine(X("\n"));
//fflush(stdout);
pTarget->flush();
pSerializer->writeNode(pTarget,*m_pDoc);
delete pTarget;



Is there some way of just giving it an ostream (cout, file or
ostreamstring) object and telling it to stream the nodes as text into
that object?

cheers

shaun
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top