Skip to Content
Former Member
Mar 01, 2013 at 01:52 AM

SAPUI5 Tree control loading


HI All,

Does anyone know if it is possible to instantiate and load a Tree control without first having to individually create all the nodes seperately setting their relationships each time?

Basially I'd like to be able to map an XML structure into a Tree control without first having to programatically pull it apart in order to create nodes.

There doesn't seem to be anything in the documentation.

Can I use aggregation somehow to perform this? This would seem to be the way that Table controls are created and filled.

So if I have some simple XML:

<?xml version="1.0"?>




<name>Root Branch</name>





<name>First Branch</name>





<name>Second Branch</name>





<name>First Sub Branch</name>




How can I read this in and create the interlinked nodes and Tree control that looks like:




tree.gif (1.9 kB)