I want to deserialze xml where I have 2 elements with the same tag but different values for their 'name' attributes. I want to do this without using an array.
The xml:
<rowset>
<row name="row1" />
<row name="row2" />
</rowset>
The class to deserialize into:
[XmlRootAttribute("rowset")]
public class Container
{
[XmlElement("row")]
public XmlNode row1;
[XmlElement("row")]
public XmlNode row2;
}
How can I target the right row element based on it's 'name' attribute's value?
That's if it's even possible?