| sapartha (1) | |
|
Hi I am trying to parse a file with the following hierarchial structure and store the information in a tree. nodeA +-nodeB ++-nodeD ++-nodeE +-nodeF +-nodeC ++-nodeG ++-nodeH ++-nodeI (+- 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? Thanks in advance | |
|
Last edited on
|
|
| ruyh (4) | |
| perhaps you could write it with the [code] flag format to make your spaces show if so desired. Sorry that I can't help you much more than that. | |
|
|
|
| ne555 (4041) | |||
| |||
|
|
|||
| Script Coder (352) | |||
I think you answered yourself. | |||
|
|
|||