For a Character-based C++ Transformation
{
RWObjectOutputStream out = //1
RWTTransformObjectOutputStreamImp<MyOutStreamTransform>
::make(cout,outTransform);
out << book2; //2
}
cout << endl;
{
RWObjectOutputStream out = //3
RWXmlObjectOutputStreamImp::make(cout);
out << book2; //4
}
return 0;
}
Here is the resulting output:
With transformation:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <rw:nested_object rw:class="book"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:rw="http://www.roguewave.com/xmlstream">
<rw:member rw:name="title" xsi:type="xsd:string">To Love
and Be Wise</rw:member>
<rw:member rw:name="author" xsi:type="xsd:string">
Josephine Tey</rw:member></rw:nested_object>
Without transformation:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rw:nested_object rw:class="book"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:rw="http://www.roguewave.com/xmlstream">
<rw:member rw:name="title" xsi:type="xsd:string">To Love and Be
Wise</rw:member>
<rw:member rw:name="author" xsi:type="xsd:string">Josephine
Tey</rw:member></rw:nested_object>