Try to create an INLINE table with pairs of adjacent nodes, parent / child relationsship.
Then use the HIERARCHY and HIERARCHYBELONGSTO LOAD prefixes to create tables that allow to use your hierarchy in a list box tree view as well as dimensions in a pivot table.