Custom XML Serialization

#557