Populate on demand a TreeView with datas in an XML
- by m6a-uds
Hi
I have a large XML file (3000+ nodes) that I want to represent in a TreeView on ASP.NET. I cannot databind it to a XMLDataSource because loading the TreeView will then be way too slow (I never even waited long enough to see it finish...)
So the solution for this would be to use the PopulateOnDemand property of the TreeNodes to load data only when needed. Problem is, I can't think of a way to acheive this...
How can-I, based on the ID of a node, search a XMLDocument to get all the childnodes of the node having this ID?
XML would look like that:
<document ID=1>
<document ID=2>
<document ID=3>
</document>
</document>
<document ID=4>
</document>
</document>
There are nor rules on how much levels it can go down or anything...