Non-recursive traversal of hierarchical data structures is disclosed.
Elements inside a hierarchical data structure are processed beginning at
a first level of the hierarchical data structure. In the event that a
branch point associated with a second level of the hierarchical data
structure is encountered, a marker data associated with a location of the
branch point within the hierarchical data structure is stored inside a
user allocated data structure, and the marker stored in the user
allocated data structure is used to enable elements, if any, in the
second level and any remaining elements in the first level, if any, to be
processed without recursion.