<root>
<child id="1">
<child1 id="1"/>
<child2>
<child11 id="1">
<child111 id="1"/>
</child11>
</child2>
</child>
<child id="2">
<child1 id="2"/>
</child>
</root>
how can i get the exact above structure using deserialization
You can roughly formalize the entity above as such:
You can then use the
XmlSerializerclass to transform the XML string into aRootclass instance (you can amend the names, where necessary).