We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Platform : WPF
Category : TreeView

How do I bind my XML Data to the tree (the xml contains multi-level hierarchical data with leaf nodes at many levels)?

Here is a sample XML and how it gets bound to a tree. The XML is of the form:


See how there can be any number of Category levels and the Reports can appear at any level too.

Here is the sample code to bind this to the tree: (For better code formatting take a look at this incident in the MSDN Forums: A xml string...need to place nodes in a treeview.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.