anand.txt gives me following o/p:
<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
nothing else
-----Original Message-----
From: Jeff Paquette [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 18, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: RE: problem in DOMPrint.cpp
Try:
std::ofstream xmlfile("anand.txt");
xmlfile << "<?xml version='1.0' encoding='UTF-8' standalone='no' ?>" <<
std::endl;
DOM_node node = parser.getDocument();
xmlfile << node << std::endl;
--
Jeff Paquette
paquette at mediaone.net
http://www.atnetsend.net
> -----Original Message-----
> From: Awasthi, Anand [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 12:47 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: problem in DOMPrint.cpp
>
>
> thanks ...and what about if i want this XML output to go to a file . lets
> say "anand.txt"
>
>
>
> -----Original Message-----
> From: MIke Wilson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 11:32 AM
> To: [EMAIL PROTECTED]
> Subject: RE: problem in DOMPrint.cpp
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Here:
>
> DOM_node node = parser.getDocument();
> std::cout << node;
>
> - -----Original Message-----
> From: Awasthi, Anand [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 12:23 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: problem in DOMPrint.cpp
>
> okay
>
> i am executing following code in main() :
>
> DOM_node node = parser.getDocument();
> ostream os;
> os << node;
>
>
> but even that is not working and gives following error message:
>
> error C2248: 'ostream::ostream' : cannot access protected member
> declared in class 'ostream'
> see declaration of 'ostream::ostream'
>
>
>
>
> - -----Original Message-----
> From: Erik Rydgren [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 10:14 AM
> To: [EMAIL PROTECTED]
> Subject: RE: problem in DOMPrint.cpp
>
>
> Ehh? cout << os?
>
> Print an ostream on stdout? Is that really what you wanna do? ;)
>
> I think you were aiming at just:
>
> os << node;
>
> I know you can go totally blind when debugging your own code.
>
> Regards
> Erik Rydgren
>
> - -----Original Message-----
> From: Awasthi, Anand [mailto:[EMAIL PROTECTED]]
> Sent: den 18 juni 2001 16:58
> To: '[EMAIL PROTECTED]'
> Subject: problem in DOMPrint.cpp
>
>
> Hi,
>
> I am trying to run the DOMPrint.cpp sample for generating XML from DOM
> tree. this sample declares and defines
>
> three following functions for this purpose:
>
> ostream& operator<<(ostream& target, const DOMString& toWrite);
> XMLFormatter& operator<< (XMLFormatter& strm, const DOMString& s);
>
> and
>
> ostream& operator<<(ostream& target, DOM_Node& toWrite); // this
> function
> writes DOMtree data into xml format in ostream.
>
>
>
> in my main function i am calling above as follows :
>
>
> DOM_Node node = parser->getDocument();
> ostream os ;
> cout << os << node;
>
>
>
> but when i compile above code, i get following error msg :
>
>
> error C2248: 'ostream::ostream' : cannot access protected member
> declared in class 'ostream'
> see declaration of 'ostream::ostream'
>
>
> could some pls tell why its happening and what i sohlud do to solve
> this
> porblem ??
> what is the correct way to call the above function in main() ??
>
>
> thanks
>
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
>
> iQA/AwUBOy4toowiya8i+ZOTEQI9/gCdEpRiO16FVhMiWiIewefxcRPlBE4An2qs
> B5btmePgz9WZytihu4fHvY4y
> =HNkj
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]