Methods and apparatus are provided which solves the looping problem in
structural documents, such as those defined by DOM, EDI and XML. The
method and apparatus remove ambiguities by presenting a user with a
hierarchical tree structure representation of the document allowing the
user to select data grouping rules to be followed. The method and
apparatus then automatically create a modified hierarchical tree
structure based upon the user-defined rules. Rules can be input by the
user using a rule table editor or by means of a graphical user interface.