I have the following XML structure:
<Response>
<Value Name="ID">1</Value>
<Value Name="User">JSmith</Value>
<Value Name="Description">Testing 123</Value>
</Response>
How can I deserialize this so that the value names are properties on the class, and the text values are the values of the properties?
Note that the value names never change, so Name="ID" will always exist, for example.
Here is my class so far:
[Serializable]
[XmlRoot("Response")]
public class ReportingResponse
{
// [What goes here?]
public string ID { get; set; }
// [...]
public string User { get; set; }
// [...]
public string Description { get; set; }
}
No comments:
Post a Comment