I have this xml feed from an API with a XML sequence.
<?xml version="1.0" encoding="UTF-8" ?>
<Function>
<Cmd>2002</Cmd>
<Status>1</Status>
<Cmd>2003</Cmd>
<Status>0</Status>
<Cmd>2004</Cmd>
<Status>0</Status>
<Cmd>1012</Cmd>
<Status>3</Status>
<Cmd>2006</Cmd>
<Status>0</Status>
<Cmd>2007</Cmd>
<Status>0</Status>
...
</Function>
I already tried a few options for deserialization with Restsharp. Ideally I would like to have something like the following, but it's obviously not working.
public class MyResponse
{
public List<Setting> Settings { get; set;}
}
public class Setting
{
public int Cmd { get; set; }
public int Status { get; set; }
}
Thank you
See Question&Answers more detail:os