Performing the Transformation
This transformation example uses a simple object named book. This object simply holds an author name and a book title. For the complete example, see buildspace\examples\xmlstreams\xsltTransform\xsltTransform.cpp.
NOTE: This example is based on the examples used in Chapter 5.
 
class book
{
public:
book ();
book (const RWCString& title, const RWCString& author);
private:
RWCString title_;
RWCString author_;
};
This section discusses the main() function for the example. The explanation is broken into three parts:
*creating a book object and serializing it to a file using an XML stream that applies a transformation to make the resulting XML more readable
*reading the file back in and restoring the book object using an XML stream that applies a transformation to restore the original XML format
*printing out both the original XML streams data for the book object and its more readable, transformed version