Serialize Survey XML to Data Object


You can use MentorLogic.Engines.Zodiac.Serialization.SurveyXmlSerializer class to serialize or deserialize the XML definition of the survey to solid type data objects.

You can serialize the survey objects to XmlDocument object as below:

XmlDocument xmlDoc = SurveyXmlSerializer.SerializeSurvey(surveyObj);

You can also serialize the survey objects to XML text as below:

string xml = SurveyXmlSerializer.SerializeSurveyToXml(surveyObj);

You can deserialize XML document representing the survey XML definition to data object as below:

Survey survey = SurveyXmlSerializer.DeserializeSurvey(xmlDocument);

You can deserialize the survey XML definition to data object as below:

Survey survey = SurveyXmlSerializer.DeserializeSurvey(xml);

See Also