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

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,841
Latest member
WilmerBelg

Latest Threads

Top