How do I go about deserializing a collection of Xml elements (all with the same element name, but with specific attributes) to an object?
Here's a snippet of the Xml:
<mibscalar name="lotOccupiedPct" link="http://localhost:8080/v1/mib/objs/lotOccupiedPct?type=xml">
<data index="1" value="0" counter="0"/>
</mibscalar>
<mibscalar name="gateStatusCloseThreshold" type="readonly" link="http://localhost:8080/v1/mib/objs/gateStatusCloseThreshold?type=xml">
<data index="1" value="90" counter="0"/>
</mibscalar>
<mibscalar name="gateStatusOpenThreshold" type="readonly" link="http://localhost:8080/v1/mib/objs/gateStatusOpenThreshold?type=xml">
<data index="1" value="70" counter="0"/>
</mibscalar>
And the corresponding properties in my class (in order):
public int CurrentOccupancyPercentage { get; set; }
public int CloseThresholdPercentage { get; set; }
public int OpenThresholdPercentage { get; set; }
I'm assuming there are some attributes I can add to the properties that can handle this scenario?
Thanks in advance.