I have seen the others responses, and as I am fiddling around with DOMPrint
at the moment, let me show you what I have done and see if that does the
trick for you.
//
---------------------------------------------------------------------------
// Local classes
//
---------------------------------------------------------------------------
class DOMPrintFormatTarget : public XMLFormatTarget
{
public:
DOMPrintFormatTarget() {}
~DOMPrintFormatTarget() {}
//
-----------------------------------------------------------------------
// Implementations of the format target interface
//
-----------------------------------------------------------------------
void writeChars(const XMLByte* const toWrite)
{
// Surprisingly, Solaris was the only platform on which
// required the char* cast to print out the string correctly.
// Without the cast, it was printing the pointer value in hex.
// Quite annoying, considering every other platform printed
// the string with the explicit cast to char* below.
//cout << (char *) toWrite; // this was the
original line
append_text ( local_buffer, (char *)toWrite ); // replace your line
here to write to a
// file
}
private:
//
-----------------------------------------------------------------------
// Unimplemented methods.
//
-----------------------------------------------------------------------
DOMPrintFormatTarget(const DOMPrintFormatTarget& other);
void operator=(const DOMPrintFormatTarget& rhs);
};
-----Original Message-----
From: Co-op DI [mailto:[EMAIL PROTECTED]]
Sent: 11 July 2001 18:02
To: '[EMAIL PROTECTED]'
Subject: problem regarding DOMPrint
Hi ,
I am trying to work with the example DOMPrint given in the samples
directory. The problem that I am haiving is that ... I am trying to print
out the output in a FILE insted of printing it out on the CONSOLE. I am
opening and closing the file properly but the output prints out on the
CONSOLE agian instead of printing to the FILE.
Instead of this line:- cout << doc << endl;
I am trying to write this piece of code but it prints out to the CONSOLE
instead of writing to the file :-
ofstream outputfile;
outputfile.open("/tilde/lpcoop/temp.txt",ios::out);
outputfile << doc << endl;
outputfile.close();
Please tell me what the problem is ?? If i try to write a normal string to
the outputfile like outputfile << "hello"; ...... it writes that to the
file.
Please reply back..
thank you very much.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
*************************************************************************
This message contains privileged and confidential information intended
only for the use of the recipient named above. Its contents do not
constitute a commitment by Strategic Thought Limited ("Strategic
Thought") unless separately endorsed by an authorised representative
of Strategic Thought.
Any use, dissemination, distribution, reproduction or unauthorised
disclosure of this message is prohibited. If you receive this message
in error, please notify the sender immediately and delete it from your
computer systems.
Any views expressed in this message are those of the individual sender
and may not necessarily reflect those of Strategic Thought.
Strategic Thought believes this e-mail and any attachments to be virus
free. However, the recipient is responsible for ensuring it is virus
free and Strategic Thought do not accept any responsibility for any
loss or damage howsoever caused from use of this e-mail, attachments
or contents.
*************************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]