Marshaling
To recreate XML content from the C++ object-oriented hierarchy, call the marshal() method on the root object purchaseOrder. This generated method correctly formats the XML per the constraints specified in the XML Schema and returns the XML as a string. The following example illustrates this step and prints the result to standard out.
 
// Invoke the marshal method on the object to create
// XML from the object and print the result to standard out
std::cout << po.marshal() << std::endl;