I am trying to parse a file with the following hierarchial structure and store the information in a tree.
(+- is the first lvel, ++- is the second level and so on, the spaces are not showing up when I post this)
The number of levels and the number of nodes in each level in the file are not known in advance (ie) the file format can be varying. I need to store the information without losing the hierarchy as I need this information for further processing once this file is parsed and stored.
I have been looking at family trees as I am not able to think of anything closer to represent this.Any suggestions on the kind of data structures I can use to represent this?