|Info||View files (2)||Download .zip||Reputation||Support forum (3)||Blog|
|Last Updated||Ratings||Unique User Downloads||Download Rankings|
|2010-12-03 (3 years ago)||Not enough user ratings||Total: 484||All time: 5,335 This week: 1,613|
|walker 1.1||MIT/X Consortium License||5||Algorithms, Data types|
It can traverse an array of elements which may be objects or arrays that have entries that define an identifier of the entry and the identifier of the parent entry.
The class calls a certain class function to process entries grouped by parent entry identifier.
That function returns a string that is concatenated to form the whole hierarchy string representation.
Sub-classes my redefine the entry processing function to generate a string in a hierarchic format.
Prize: One year subscription to the PDF edition of the JSMag magazine
|Databases are often used to store records of data that form hierarchic trees. Usually there is one field that represents the record identifier and another that represents the identifier of the parent record.
If you want to output those data records in an hierarchic format such as XML or JSON, you need to properly traverse the retrieved data records and group them appropriately according to the parent of each record.
This class can be used to do exactly data. It takes an array of hierarchic data records eventually retrieved from database and generates the respective serialized representation in XML or JSON format.
|Version Control||Unique User Downloads||Download Rankings|
|This week:||0||This week:||1,613|
|User Comments (1)|