You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Sascha Presnac <sa...@bestcolor.com> on 2001/11/05 08:59:52 UTC
Problems writing XML to file
Hi all,
i have problems writing back the parsed XML to a file using the DOMPrint
sample.
I have this code, it compiles well, but does not write anything (using
stream-write() DOES write, but using the operator<< writes nothing).
domDocument is declared as:
DOM_Node domDocument = domParser->getDocument();
What is wrong?
-------------------------------------------------
filebuf* myfile = new filebuf();
int iOpenParam = ios::trunc;
int iNProt = filebuf::sh_write || filebuf::sh_read;
ostream* mystream = NULL;
mystream = new ostream(myfile->open("d:\\test.txt",iOpenParam,iNProt));
(ostream&)*mystream << domDocument;
(ostream&)*mystream << flush;
myfile->close();
-------------------------------------------------
Regards,
Sascha
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org