Read a XML tree structure recursively in a List<T> with children lists<T>
问题 I have an XML like this: And I have a Member class with property Name. How can I read every Unit and its children Units into multiple generic List<Unit> which can have again children List<Unit> in a recursively way using latest .NET technology ? <Root> <Units Name="Test1"> <Unit Name="Test11" /> <Unit Name="Test12"> <Unit Name="Test21" /> <Unit Name="Test22" /> <Unit Name="Test23"> <Unit Name="Test31" /> <Unit Name="Test32" /> <Unit Name="Test33" /> </Unit> <Unit Name="Test24" /> </Unit> <