I am reading from a flat file database with the following structure
ID | ParentID | NAME
ID | ParentID | NAME
ID | ParentID | NAME
ID | ParentID | NAME
I am trying to avoid reinventing the wheel here. I now it is possible to iterate through the array an build a tree.
I am trying to create and xml like output with opening and losing tags like so.
In this case the opening tag is "item[" and the closing tag is "]"
item[ { type:name }
{ type:name }
item [ { type:name }
{ type:name }
]
]
Any suggestions on how to organize my code or has someone done this before so I dont have to reinvent the wheel.
Thanks in advance
haunter@battlestrata.com
ID | ParentID | NAME
ID | ParentID | NAME
ID | ParentID | NAME
ID | ParentID | NAME
I am trying to avoid reinventing the wheel here. I now it is possible to iterate through the array an build a tree.
I am trying to create and xml like output with opening and losing tags like so.
In this case the opening tag is "item[" and the closing tag is "]"
item[ { type:name }
{ type:name }
item [ { type:name }
{ type:name }
]
]
Any suggestions on how to organize my code or has someone done this before so I dont have to reinvent the wheel.
Thanks in advance
haunter@battlestrata.com