Use the XmlSerializer class to serialize objects to Xml format