I have an XML like this:
<roottag>
<tag1>.....</tag1>
<tag2>.....</tag2>
<tag3>
<tag3.1>.....</tag3.1>
<tag3.2>.....</tag3.2>
</tag3>
<tag4>
<tag4.1>
<tag4.1.1>......</tag4.1.1>
</tag4.1>
</tag4>
</roottag>
I want to convert this XML into a form which can be easily traversed and also maintain the the hierarchy in the XML. In php, there is Nested Associative Array
which can be used. In C# How can I accomplish this ?