You may be able to do this in a different manner. Your options depend on how the database has structured the data. For example you can have a table defining "measures", another table defining "measure setps" and so on.
Each measure has an ID (MID) and each measure step has an ID (MSID) and these can be related to each other to provide the hierarchy. So in this case you could just get a measure, then query for all the measure steps that match (the MID and MSID) and sort them based on some attribute/criteria and work down in that manner.
This would provide a clean data architecture and enable you to reuse steps in multiple measures if you needed to. I'm not sure how your database is building the hierarchy, in the end there are some parent ch
ild relationships defined ... these would be very similar to the IDs referred to above.
Like you said, had to explain without a picture.
Regards,
Kamran