Xerces output stream

Discussion in 'XML' started by shaun, May 3, 2005.

  1. shaun

    shaun Guest

    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
    shaun, May 3, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cvissy
    Replies:
    0
    Views:
    592
    cvissy
    Nov 16, 2004
  2. Girish
    Replies:
    1
    Views:
    934
    Fabien R
    Apr 14, 2005
  3. Nobody
    Replies:
    3
    Views:
    943
    Joseph Kesselman
    May 9, 2006
  4. Rasmusson, Lars
    Replies:
    1
    Views:
    702
    popov
    Apr 30, 2004
  5. Kashif Ur Rehman
    Replies:
    2
    Views:
    851
    Tom Hawtin
    May 17, 2007
Loading...

Share This Page