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
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