Full content pending...
There are cases when it is convenient to be able to take a model or a part of a model and serialize it as XML without spending time specifying detailed binding. This comes up, for instance, when debugging or writing unit tests. To address this requirement, Sapphire supports default XML binding that doesn't require any XML binding annotations to be used.
Default XML binding uses property and type names for element names in XML. More formally:
Here is a small example of what default XML binding would produce for the Sapphire contacts sample if that sample didn't specify XML binding via explicit annotations:
<ContactsDatabase>
<Contacts>
<Contact>
<Name>John</Name>
<PhoneNumbers>
<PhoneNumber>
<Type>home</Type>
<AreaCode>555</AreaCode>
<LocalNumber>555-5555</LocalNumber>
</PhoneNumber>
<PhoneNumber>
<Type>mobile</Type>
<AreaCode>555</AreaCode>
<LocalNumber>555-6666</LocalNumber>
</PhoneNumber>
</PhoneNumbers>
</Contact>
<Contact>
<Name>Beth</Name>
</Contact>
</Contacts>
</ContactsDatabase>