C++ XML Objects Use: Writing them out |
Previous Next Usage Home Installation Docs
We can now write the objects back to the disk as an XML file.
The following code writes an object (and all it's composite objects) to a std::cout, and
output's any errors to std::cerr:
if (!obj->write(&std::cout, &std::cerr))
... what do you want to do now? it didn't work.
That's it. You can take a look at what obj->write() does, but it defines an object_writer and then uses it to write, so it would be easy to write some other format, or change the writer in some way...
Previous Next Usage Home Installation Docs
Generated: Wed Apr 5 23:00:19 EST 2006
Copyright (c) 2005; Paul Hamilton; pHamtec P/L.
Use, modification, and distribution is provided free of any limitations.