I have 4 small classes to deserialize xml from an incomming xml poll, to usable classes to build up the poll.
now, i know how to set a property from a class, to matc
In AnswerItem
, make a property called Value
and mark it with the XmlText
attribute. This setting will cause the XmlSerializer
to read the text in the AnswerItem
element into the Value
property.
[Serializable()]
public class AnswerItem
{
[XmlAttribute("Id")]
public Guid QuestionId { get; set; }
[XmlText]
public string Value { get; set; }
}