Basically, all I have to do is read some xml from a file. And I have a working solution, although I am not sure that it is the best way of going about doing things, as I have only recently started working with xml. Any advice on how I could improve the following?
[XmlRoot("iosLayout")]
public class iosLayoutXml
{
[XmlElement("transactionLayout")]
public List<TransactionLayoutXml> transactionLayouts { get; set; } = new List<TransactionLayoutXml>();
}
[XmlRoot("transactionLayout")]
public class TransactionLayoutXml
{
[XmlElement("field")]
public List<FieldXml> fields { get; set; } = new List<FieldXml>();
[XmlAttribute("type")]
public string type { get; set; }
}
[XmlRoot("field")]
public class FieldXml
{
[XmlAttribute("element")]
public string element { get; set; }
[XmlAttribute("text")]
public string text { get; set; }
[XmlAttribute("value")]
public string value { get; set; }
}