Deserialize different element tags into one object class C#?



I have the this form of xml



<Element attributeX="X" attributeY="Y">
<SubElement attributeX="X" attributeY="Z"/>
</Element>
<Element attributeX="X" attributeY="Y">
<SubElement attributeX="X" attributeY="Z"/>
<Element attributeX="X" attributeY="Y">
<SubElement attributeX="X" attributeY="Z"/>
</Element>
</Element>


but in the code I have one object class for "Element" and "SubElement" with attributes "attributeY" "attributeX" and "attributeZ", I cannot find a way to do the deserialisation of the XML ?


No comments:

Post a Comment