Restoring the book Object
At this point you have written the book object XML data to the file book.xml. Next restore the object, which involves:
*reading in the file book.xml
*restoring the object as book2
 
{
ifstream fin("book.xml"); //1
 
RWObjectInputStream in = //2
RWEnhancedXmlObjectInputStreamImp::make(fin);
in >> book2; //3
}
//1 Creates an ifstream for reading in the object data.
//2 Sets up an enhanced XML input stream.
//3 Restores the book object as the book2 instance create earlier.