I have a variable of XDocument, and I want to display its structure in a TreeView. I tried
TreeView1.DataSource = doc;
but I got this error
HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable.