Marshal methods
The first overload of marshal takes two optional parameters:
 
std::string
marshal(bool includeChildTypeAttributes = false,
const rwsf::XmlName& elementName=DefaultElementName,
bool nilValue = false) const;
When includeChildTypeAttributes is true, the children of this element each contain an xsi:type attribute. The exact signature of this method depends on the type mapping used for xsd:string. For example, in classes generated with the ‑SourcePro flag, the method returns an RWCString.
The elementName parameter sets the name of the element. By default, the element uses the DefaultElementName created by the code generator. For a class that represents a top-level element, the DefaultElementName is the name of the element. For classes that represent a datatype, the DefaultElementName is the name of the datatype.
For the implications of the nilValue parameter, see nillable Elements.
The second overload of marshal requires a writer instance as the first parameter:
 
void
marshal(rwsf::XmlWriter& writer,
bool includeChildTypeAttributes = false,
const rwsf::XmlName& elementName=DefaultElementName,
bool includeSelfTypeAttribute = false,
bool nilValue = false) const;
This method marshals the element into the provided rwsf::XmlWriter. The includeChildTypeAttributes parameter and the elementName parameter behave as described above for the first overload of marshal. The method includes an xsi:type attribute on the element itself when includeSelfTypeAttribute is true. For the implications of the nilValue parameter, see nillable Elements.