SourcePro Core
:
XML Streams Module User’s Guide
:
Performing Transformations
:
Transforming your XML Documents
:
Restoring the book Object
: For an Element-based C++ Transformation
For an Element-based C++ Transformation
{
ifstream fin("book.xml"); //1
RWObjectInputStream in = //2
RWTParsedObjectInputStreamImp<MyInParsedTransform>
::make(fin,inTransform);
in >> book2; //3
}
//1
Creates an
ifstream
for reading in the object data.
//2
Sets up an XML input stream that includes support for a transformation.
//3
Restores the
book
object as the
book2
instance create earlier, transforming the XML back to the expected XML format in the process.
This site works best with JavaScript enabled